diff options
author | Dan Carpenter <error27@gmail.com> | 2023-02-22 16:17:06 +0100 |
---|---|---|
committer | Sudeep Holla <sudeep.holla@arm.com> | 2023-03-06 09:42:32 +0100 |
commit | 6bed395d7db2c039c0ef4123a379e27c528a3357 (patch) | |
tree | f1868e59ce1fdd84c73d12f5b2700e32d02eee53 /drivers | |
parent | firmware: arm_scmi: Clean up a return statement in scmi_probe (diff) | |
download | linux-6bed395d7db2c039c0ef4123a379e27c528a3357.tar.xz linux-6bed395d7db2c039c0ef4123a379e27c528a3357.zip |
firmware: arm_scmi: Return a literal instead of a variable
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>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/Y/Yx8pOdf8rNhPVe@kili
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/firmware/arm_scmi/bus.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 */ |