mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
software node: Initialize the return value in software_node_find_by_name()
The software node is searched from a list that may be empty
when the function is called. This makes sure that the
function returns NULL if the list is empty.
Fixes: 1666faedb5 ("software node: Add software_node_find_by_name()")
Reported-by: kbuild test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Heikki Krogerus <[email protected]>
Reviewed-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
This commit is contained in:
parent
616368735e
commit
016049a816
1 changed files with 1 additions and 1 deletions
|
|
@ -633,7 +633,7 @@ static const struct fwnode_operations software_node_ops = {
|
|||
const struct software_node *
|
||||
software_node_find_by_name(const struct software_node *parent, const char *name)
|
||||
{
|
||||
struct swnode *swnode;
|
||||
struct swnode *swnode = NULL;
|
||||
struct kobject *k;
|
||||
|
||||
if (!name)
|
||||
|
|
|
|||
Loading…
Reference in a new issue