The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Dipen Patel <dipenp@nvidia.com>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH 2/2] hte: uninitialized variable in hte_ts_get()
Date: Fri, 6 May 2022 17:54:31 +0300	[thread overview]
Message-ID: <YnU2p2CoNkcxBUKN@kili> (raw)
In-Reply-To: <YnU2gHe+QZOAuNyV@kili>

The "free_name" variable is sometimes used without being initialized.

31ab09b42188 ("drivers: Add hardware timestamp engine (HTE) subsystem")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/hte/hte.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hte/hte.c b/drivers/hte/hte.c
index a14c5bf290ff..7c3b4476f890 100644
--- a/drivers/hte/hte.c
+++ b/drivers/hte/hte.c
@@ -572,7 +572,7 @@ int hte_ts_get(struct device *dev, struct hte_ts_desc *desc, int index)
 	struct of_phandle_args args;
 	u32 xlated_id;
 	int ret;
-	bool free_name;
+	bool free_name = false;
 
 	if (!desc)
 		return -EINVAL;
-- 
2.35.1


  reply	other threads:[~2022-05-06 14:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-06 14:53 [PATCH 1/2] hte: fix off by one in hte_push_ts_ns() Dan Carpenter
2022-05-06 14:54 ` Dan Carpenter [this message]
2022-05-06 18:21   ` [PATCH 2/2] hte: uninitialized variable in hte_ts_get() Dipen Patel
2022-05-06 18:25 ` [PATCH 1/2] hte: fix off by one in hte_push_ts_ns() Dipen Patel

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=YnU2p2CoNkcxBUKN@kili \
    --to=dan.carpenter@oracle.com \
    --cc=dipenp@nvidia.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox