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 even if the list is empty.
Fixes: 80488a6b1d3c ("software node: Add support for static node descriptors")
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]>
static struct swnode *
software_node_to_swnode(const struct software_node *node)
{
- struct swnode *swnode;
+ struct swnode *swnode = NULL;
struct kobject *k;
if (!node)