Patch "software node: Let args be NULL in software_node_get_reference_args" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    software node: Let args be NULL in software_node_get_reference_args

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     software-node-let-args-be-null-in-software_node_get_.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 6d2c75d5db1a5d08ccddb94db56b4cdeff70dfe2
Author: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
Date:   Thu Nov 9 12:10:09 2023 +0200

    software node: Let args be NULL in software_node_get_reference_args
    
    [ Upstream commit 1eaea4b3604eb9ca7d9a1e73d88fc121bb4061f5 ]
    
    fwnode_get_property_reference_args() may not be called with args argument
    NULL and while OF already supports this. Add the missing NULL check.
    
    The purpose is to be able to count the references.
    
    Fixes: b06184acf751 ("software node: Add software_node_get_reference_args()")
    Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
    Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
    Reviewed-by: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20231109101010.1329587-3-sakari.ailus@xxxxxxxxxxxxxxx
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/base/swnode.c b/drivers/base/swnode.c
index 4c3b9813b284..636d52d1a1b8 100644
--- a/drivers/base/swnode.c
+++ b/drivers/base/swnode.c
@@ -604,6 +604,9 @@ software_node_get_reference_args(const struct fwnode_handle *fwnode,
 	if (nargs > NR_FWNODE_REFERENCE_ARGS)
 		return -EINVAL;
 
+	if (!args)
+		return 0;
+
 	args->fwnode = software_node_get(refnode);
 	args->nargs = nargs;
 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux