From: Tanmay Shah <tanmay.shah@amd.com>
To: <andersson@kernel.org>, <mathieu.poirier@linaro.org>,
<nathan@kernel.org>, <ndesaulniers@google.com>,
<morbo@google.com>, <justinstitt@google.com>,
<tanmay.shah@amd.com>
Cc: <linux-remoteproc@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <llvm@lists.linux.dev>,
kernel test robot <lkp@intel.com>
Subject: [PATCH] drivers: remoteproc: xlnx: fix uninitialize variable use
Date: Tue, 23 Apr 2024 10:02:11 -0700 [thread overview]
Message-ID: <20240423170210.1035957-1-tanmay.shah@amd.com> (raw)
Fix following warning for clang compiler with W=1 option:
initialize the variable 'ret' to silence this warning
907 | int ret, i;
| ^
| = 0
Fixes: a6b974b40f94 ("drivers: remoteproc: xlnx: Add Versal and Versal-NET support")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202404231839.oHiY9Lw8-lkp@intel.com/
Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
---
drivers/remoteproc/xlnx_r5_remoteproc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/remoteproc/xlnx_r5_remoteproc.c b/drivers/remoteproc/xlnx_r5_remoteproc.c
index a6d8ac7394e7..d98940d7ef8f 100644
--- a/drivers/remoteproc/xlnx_r5_remoteproc.c
+++ b/drivers/remoteproc/xlnx_r5_remoteproc.c
@@ -904,7 +904,7 @@ static int zynqmp_r5_core_init(struct zynqmp_r5_cluster *cluster,
{
struct device *dev = cluster->dev;
struct zynqmp_r5_core *r5_core;
- int ret, i;
+ int ret = -EINVAL, i;
r5_core = cluster->r5_cores[0];
base-commit: e99fcac055b3325283d6c5c61a117651fb147686
--
2.25.1
next reply other threads:[~2024-04-23 17:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-23 17:02 Tanmay Shah [this message]
2024-04-23 19:32 ` [PATCH] drivers: remoteproc: xlnx: fix uninitialize variable use Mathieu Poirier
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=20240423170210.1035957-1-tanmay.shah@amd.com \
--to=tanmay.shah@amd.com \
--cc=andersson@kernel.org \
--cc=justinstitt@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=mathieu.poirier@linaro.org \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).