From: Dan Carpenter <error27@gmail.com>
To: Cristian Marussi <cristian.marussi@arm.com>
Cc: Sudeep Holla <sudeep.holla@arm.com>,
linux-arm-kernel@lists.infradead.org,
kernel-janitors@vger.kernel.org
Subject: [PATCH] firmware: arm_scmi: return a literal instead of a variable
Date: Wed, 22 Feb 2023 18:17:06 +0300 [thread overview]
Message-ID: <Y/Yx8pOdf8rNhPVe@kili> (raw)
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 */
--
2.39.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2023-02-23 4:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-22 15:17 Dan Carpenter [this message]
2023-02-23 12:28 ` [PATCH] firmware: arm_scmi: return a literal instead of a variable Cristian Marussi
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/Yx8pOdf8rNhPVe@kili \
--to=error27@gmail.com \
--cc=cristian.marussi@arm.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