* [PATCH 2/2] software node: Fix use of potentially uninitialized variable
[not found] <20190829132116.76120-1-heikki.krogerus@linux.intel.com>
@ 2019-08-29 13:21 ` Heikki Krogerus
2019-08-29 13:28 ` Heikki Krogerus
2019-08-29 13:50 ` Sasha Levin
0 siblings, 2 replies; 3+ messages in thread
From: Heikki Krogerus @ 2019-08-29 13:21 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Greg Kroah-Hartman, linux-kernel, stable, kbuild test robot,
Dan Carpenter
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)
--
2.23.0.rc1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] software node: Fix use of potentially uninitialized variable
2019-08-29 13:21 ` [PATCH 2/2] software node: Fix use of potentially uninitialized variable Heikki Krogerus
@ 2019-08-29 13:28 ` Heikki Krogerus
2019-08-29 13:50 ` Sasha Levin
1 sibling, 0 replies; 3+ messages in thread
From: Heikki Krogerus @ 2019-08-29 13:28 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Greg Kroah-Hartman, linux-kernel, stable, kbuild test robot,
Dan Carpenter
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,
--
heikki
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] software node: Fix use of potentially uninitialized variable
2019-08-29 13:21 ` [PATCH 2/2] software node: Fix use of potentially uninitialized variable Heikki Krogerus
2019-08-29 13:28 ` Heikki Krogerus
@ 2019-08-29 13:50 ` Sasha Levin
1 sibling, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2019-08-29 13:50 UTC (permalink / raw)
To: Heikki Krogerus
Cc: Rafael J. Wysocki, Greg Kroah-Hartman, linux-kernel, stable,
kbuild test robot, Dan Carpenter
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-08-29 13:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20190829132116.76120-1-heikki.krogerus@linux.intel.com>
2019-08-29 13:21 ` [PATCH 2/2] software node: Fix use of potentially uninitialized variable Heikki Krogerus
2019-08-29 13:28 ` Heikki Krogerus
2019-08-29 13:50 ` Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).