From: Cristian Marussi <cristian.marussi@arm.com>
To: Dan Carpenter <error27@gmail.com>
Cc: Sudeep Holla <sudeep.holla@arm.com>,
linux-arm-kernel@lists.infradead.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] firmware: arm_scmi: return a literal instead of a variable
Date: Thu, 23 Feb 2023 12:28:46 +0000 [thread overview]
Message-ID: <Y/dXQ+NSx14lcajo@e120937-lin> (raw)
In-Reply-To: <Y/Yx8pOdf8rNhPVe@kili>
On Wed, Feb 22, 2023 at 06:17:06PM +0300, Dan Carpenter wrote:
> In this context "return scmi_dev;" and "return NULL;" are equivalent
> but it is more readable to return a literal.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> ---
> drivers/firmware/arm_scmi/bus.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/firmware/arm_scmi/bus.c b/drivers/firmware/arm_scmi/bus.c
> index 73140b854b31..ac306ca48b07 100644
> --- a/drivers/firmware/arm_scmi/bus.c
> +++ b/drivers/firmware/arm_scmi/bus.c
> @@ -436,7 +436,7 @@ struct scmi_device *scmi_device_create(struct device_node *np,
> /* Nothing to do. */
> if (!phead) {
> mutex_unlock(&scmi_requested_devices_mtx);
> - return scmi_dev;
> + return NULL;
> }
>
> /* Walk the list of requested devices for protocol and create them */
LGTM.
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Thanks,
Cristian
_______________________________________________
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:[~2023-02-23 12:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-22 15:17 [PATCH] firmware: arm_scmi: return a literal instead of a variable Dan Carpenter
2023-02-23 12:28 ` Cristian Marussi [this message]
2023-03-09 14:10 ` 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=Y/dXQ+NSx14lcajo@e120937-lin \
--to=cristian.marussi@arm.com \
--cc=error27@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--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