Skip to content

Commit 6bed395

Browse files
error27sudeep-holla
authored andcommitted
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 <[email protected]> Reviewed-by: Cristian Marussi <[email protected]> Link: https://lore.kernel.org/r/Y/Yx8pOdf8rNhPVe@kili Signed-off-by: Sudeep Holla <[email protected]>
1 parent 8ab5059 commit 6bed395

File tree

1 file changed

+1
-1
lines changed
  • drivers/firmware/arm_scmi

1 file changed

+1
-1
lines changed

drivers/firmware/arm_scmi/bus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ struct scmi_device *scmi_device_create(struct device_node *np,
436436
/* Nothing to do. */
437437
if (!phead) {
438438
mutex_unlock(&scmi_requested_devices_mtx);
439-
return scmi_dev;
439+
return NULL;
440440
}
441441

442442
/* Walk the list of requested devices for protocol and create them */

0 commit comments

Comments
 (0)