All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qi Liu <liuqi115@huawei.com>
To: <mathieu.poirier@linaro.org>, <suzuki.poulose@arm.com>,
	<mike.leach@linaro.org>
Cc: <coresight@lists.linaro.org>, <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>, <linuxarm@huawei.com>
Subject: [PATCH 1/3] coresight: core: Fix use of uninitialized pointer
Date: Thu, 13 May 2021 21:27:47 +0800	[thread overview]
Message-ID: <1620912469-52222-2-git-send-email-liuqi115@huawei.com> (raw)
In-Reply-To: <1620912469-52222-1-git-send-email-liuqi115@huawei.com>

From: Junhao He <hejunhao2@hisilicon.com>

Currently the pointer "sink" might be checked before initialized. Fix
this by initializing this pointer.

Signed-off-by: Junhao He <hejunhao2@hisilicon.com>
Signed-off-by: Qi Liu <liuqi115@huawei.com>
---
 drivers/hwtracing/coresight/coresight-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/hwtracing/coresight/coresight-core.c
index 6c68d34..4ddf3d2 100644
--- a/drivers/hwtracing/coresight/coresight-core.c
+++ b/drivers/hwtracing/coresight/coresight-core.c
@@ -608,7 +608,7 @@ static struct coresight_device *
 coresight_find_enabled_sink(struct coresight_device *csdev)
 {
 	int i;
-	struct coresight_device *sink;
+	struct coresight_device *sink = NULL;
 
 	if ((csdev->type == CORESIGHT_DEV_TYPE_SINK ||
 	     csdev->type == CORESIGHT_DEV_TYPE_LINKSINK) &&
-- 
2.7.4


WARNING: multiple messages have this Message-ID (diff)
From: Qi Liu <liuqi115@huawei.com>
To: <mathieu.poirier@linaro.org>, <suzuki.poulose@arm.com>,
	<mike.leach@linaro.org>
Cc: <coresight@lists.linaro.org>, <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>, <linuxarm@huawei.com>
Subject: [PATCH 1/3] coresight: core: Fix use of uninitialized pointer
Date: Thu, 13 May 2021 21:27:47 +0800	[thread overview]
Message-ID: <1620912469-52222-2-git-send-email-liuqi115@huawei.com> (raw)
In-Reply-To: <1620912469-52222-1-git-send-email-liuqi115@huawei.com>

From: Junhao He <hejunhao2@hisilicon.com>

Currently the pointer "sink" might be checked before initialized. Fix
this by initializing this pointer.

Signed-off-by: Junhao He <hejunhao2@hisilicon.com>
Signed-off-by: Qi Liu <liuqi115@huawei.com>
---
 drivers/hwtracing/coresight/coresight-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/hwtracing/coresight/coresight-core.c
index 6c68d34..4ddf3d2 100644
--- a/drivers/hwtracing/coresight/coresight-core.c
+++ b/drivers/hwtracing/coresight/coresight-core.c
@@ -608,7 +608,7 @@ static struct coresight_device *
 coresight_find_enabled_sink(struct coresight_device *csdev)
 {
 	int i;
-	struct coresight_device *sink;
+	struct coresight_device *sink = NULL;
 
 	if ((csdev->type == CORESIGHT_DEV_TYPE_SINK ||
 	     csdev->type == CORESIGHT_DEV_TYPE_LINKSINK) &&
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-05-13 13:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-13 13:27 [PATCH 0/3] coresight: Few cleanups Qi Liu
2021-05-13 13:27 ` Qi Liu
2021-05-13 13:27 ` Qi Liu [this message]
2021-05-13 13:27   ` [PATCH 1/3] coresight: core: Fix use of uninitialized pointer Qi Liu
2021-05-13 13:27 ` [PATCH 2/3] coresight: core: Remove unnecessary assignment Qi Liu
2021-05-13 13:27   ` Qi Liu
2021-05-13 13:27 ` [PATCH 3/3] coresight: etm4x: core: Remove redundant check of attr Qi Liu
2021-05-13 13:27   ` Qi Liu
2021-05-13 13:56 ` [PATCH 0/3] coresight: Few cleanups Suzuki K Poulose
2021-05-13 13:56   ` Suzuki K Poulose

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1620912469-52222-2-git-send-email-liuqi115@huawei.com \
    --to=liuqi115@huawei.com \
    --cc=coresight@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=mathieu.poirier@linaro.org \
    --cc=mike.leach@linaro.org \
    --cc=suzuki.poulose@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.