[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAFCwf139_RCeudr5RVxhO2A8G8vgj-Qc_0aZ8vGqLRjoP0Ga8g@mail.gmail.com>
Date: Sun, 23 Jan 2022 16:39:23 +0200
From: Oded Gabbay <ogabbay@...nel.org>
To: Dan Carpenter <dan.carpenter@...cle.com>
Cc: Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Ofir Bitton <obitton@...ana.ai>,
Yuri Nudelman <ynudelman@...ana.ai>,
farah kassabri <fkassabri@...ana.ai>,
Alon Mizrahi <amizrahi@...ana.ai>,
"Linux-Kernel@...r. Kernel. Org" <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] habanalabs: silence an uninitialized variable warning
On Tue, Jan 11, 2022 at 9:17 AM Dan Carpenter <dan.carpenter@...cle.com> wrote:
>
> Smatch warns that:
>
> drivers/misc/habanalabs/common/command_buffer.c:471 hl_cb_ioctl()
> error: uninitialized symbol 'device_va'.
>
> Which is true, but harmless. Anyway, it's easy to silence this by
> adding a error check.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
> ---
> drivers/misc/habanalabs/common/command_buffer.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/misc/habanalabs/common/command_buffer.c b/drivers/misc/habanalabs/common/command_buffer.c
> index 3c0ae07a2d80..b9483a3cee91 100644
> --- a/drivers/misc/habanalabs/common/command_buffer.c
> +++ b/drivers/misc/habanalabs/common/command_buffer.c
> @@ -464,6 +464,8 @@ int hl_cb_ioctl(struct hl_fpriv *hpriv, void *data)
> args->in.flags,
> &usage_cnt,
> &device_va);
> + if (rc)
> + break;
>
> memset(&args->out, 0, sizeof(args->out));
>
> --
> 2.20.1
>
Thanks!
Reviewed-by: Oded Gabbay <ogabbay@...nel.org>
Applied to -next.
Powered by blists - more mailing lists