From: Dan Carpenter <dan.carpenter@oracle.com>
To: Cristian Marussi <cristian.marussi@arm.com>
Cc: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, sudeep.holla@arm.com,
kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] firmware: arm_scmi: Fix late checks on pointer dereference
Date: Wed, 4 May 2022 09:44:36 +0300 [thread overview]
Message-ID: <20220504064436.GJ4031@kadam> (raw)
In-Reply-To: <20220503121047.3590340-1-cristian.marussi@arm.com>
On Tue, May 03, 2022 at 01:10:47PM +0100, Cristian Marussi wrote:
> A few dereferences could happen before the iterator pointer argument was
> checked for NULL, causing the following smatch warnings:
>
> drivers/firmware/arm_scmi/driver.c:1214 scmi_iterator_run() warn: variable
> dereferenced before check 'i' (see line 1210)
>
> Fix by moving the checks early and dropping some unneeded local references.
>
> No functional change.
If there is no chance these can be NULL then a different option is to
just delete the NULL checks.
regards,
dan carpenter
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-05-04 6:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-03 12:10 [PATCH] firmware: arm_scmi: Fix late checks on pointer dereference Cristian Marussi
2022-05-04 6:44 ` Dan Carpenter [this message]
2022-05-04 6:55 ` Cristian Marussi
2022-05-04 9:50 ` Sudeep Holla
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=20220504064436.GJ4031@kadam \
--to=dan.carpenter@oracle.com \
--cc=cristian.marussi@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=sudeep.holla@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox