Skip to content

Commit

Permalink
firmware: arm_scmi: Return a literal instead of a variable
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
error27 authored and sudeep-holla committed Mar 6, 2023
1 parent 8ab5059 commit 6bed395
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/firmware/arm_scmi/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 6bed395

Please sign in to comment.