reported by smatch: drivers/base/swnode.c:71 software_node_to_swnode() error: uninitialized symbol 'swnode'.
Fixes: 80488a6b1d3c ("software node: Add support for static node descriptors") Cc: stable@vger.kernel.org Reported-by: kbuild test robot lkp@intel.com Reported-by: Dan Carpenter dan.carpenter@oracle.com Signed-off-by: Heikki Krogerus heikki.krogerus@linux.intel.com --- drivers/base/swnode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/base/swnode.c b/drivers/base/swnode.c index de9596fc4166..a1f3f0994f9f 100644 --- a/drivers/base/swnode.c +++ b/drivers/base/swnode.c @@ -51,7 +51,7 @@ EXPORT_SYMBOL_GPL(is_software_node); static struct swnode * software_node_to_swnode(const struct software_node *node) { - struct swnode *swnode; + struct swnode *swnode = NULL; struct kobject *k;
if (!node)
On Thu, Aug 29, 2019 at 04:21:16PM +0300, Heikki Krogerus wrote:
reported by smatch: drivers/base/swnode.c:71 software_node_to_swnode() error: uninitialized symbol 'swnode'.
Fixes: 80488a6b1d3c ("software node: Add support for static node descriptors") Cc: stable@vger.kernel.org
Sorry. That was not needed. I need to resend these.
I think I'll just squash these two patches together.
thanks,
On Thu, Aug 29, 2019 at 04:21:16PM +0300, Heikki Krogerus wrote:
reported by smatch: drivers/base/swnode.c:71 software_node_to_swnode() error: uninitialized symbol 'swnode'.
Could you describe the actual problem it fixes? Under what scenario would this issue occur and how would it manifest?
We're not here to fix smatch warnings, we're here to fix bugs that smatch warns us about :)
-- Thanks, Sasha
linux-stable-mirror@lists.linaro.org