All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] software nodes: Fix use of potentially uninitialized variable
@ 2019-08-30  7:51 Heikki Krogerus
  2019-08-30  7:51 ` [PATCH v3 1/2] software node: Initialize the return value in software_node_to_swnode() Heikki Krogerus
  2019-08-30  7:51 ` [PATCH v3 2/2] software node: Initialize the return value in software_node_find_by_name() Heikki Krogerus
  0 siblings, 2 replies; 7+ messages in thread
From: Heikki Krogerus @ 2019-08-30  7:51 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Greg Kroah-Hartman, linux-kernel

Hi,

The patches now have a bit better commit messages (hopefully).

Rafael should take these since the patches that these fix are
in his tree.

thanks,

Heikki Krogerus (2):
  software node: Initialize the return value in
    software_node_to_swnode()
  software node: Initialize the return value in
    software_node_find_by_name()

 drivers/base/swnode.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.23.0.rc1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v3 1/2] software node: Initialize the return value in software_node_to_swnode()
  2019-08-30  7:51 [PATCH v3 0/2] software nodes: Fix use of potentially uninitialized variable Heikki Krogerus
@ 2019-08-30  7:51 ` Heikki Krogerus
  2019-09-04 12:07   ` Greg Kroah-Hartman
  2019-08-30  7:51 ` [PATCH v3 2/2] software node: Initialize the return value in software_node_find_by_name() Heikki Krogerus
  1 sibling, 1 reply; 7+ messages in thread
From: Heikki Krogerus @ 2019-08-30  7:51 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Greg Kroah-Hartman, linux-kernel, kbuild test robot, Dan Carpenter

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 <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 024d3f54a8d6..82dd69d72a64 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] 7+ messages in thread

* [PATCH v3 2/2] software node: Initialize the return value in software_node_find_by_name()
  2019-08-30  7:51 [PATCH v3 0/2] software nodes: Fix use of potentially uninitialized variable Heikki Krogerus
  2019-08-30  7:51 ` [PATCH v3 1/2] software node: Initialize the return value in software_node_to_swnode() Heikki Krogerus
@ 2019-08-30  7:51 ` Heikki Krogerus
  2019-09-04 12:07   ` Greg Kroah-Hartman
  1 sibling, 1 reply; 7+ messages in thread
From: Heikki Krogerus @ 2019-08-30  7:51 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Greg Kroah-Hartman, linux-kernel, kbuild test robot, Dan Carpenter

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: 1666faedb567 ("software node: Add software_node_get_reference_args()")
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 82dd69d72a64..3566079fa87d 100644
--- a/drivers/base/swnode.c
+++ b/drivers/base/swnode.c
@@ -722,7 +722,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)
-- 
2.23.0.rc1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v3 1/2] software node: Initialize the return value in software_node_to_swnode()
  2019-08-30  7:51 ` [PATCH v3 1/2] software node: Initialize the return value in software_node_to_swnode() Heikki Krogerus
@ 2019-09-04 12:07   ` Greg Kroah-Hartman
  2019-09-04 21:03     ` Rafael J. Wysocki
  0 siblings, 1 reply; 7+ messages in thread
From: Greg Kroah-Hartman @ 2019-09-04 12:07 UTC (permalink / raw)
  To: Heikki Krogerus
  Cc: Rafael J. Wysocki, linux-kernel, kbuild test robot, Dan Carpenter

On Fri, Aug 30, 2019 at 10:51:55AM +0300, Heikki Krogerus wrote:
> 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 <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v3 2/2] software node: Initialize the return value in software_node_find_by_name()
  2019-08-30  7:51 ` [PATCH v3 2/2] software node: Initialize the return value in software_node_find_by_name() Heikki Krogerus
@ 2019-09-04 12:07   ` Greg Kroah-Hartman
  2019-09-04 21:06     ` Rafael J. Wysocki
  0 siblings, 1 reply; 7+ messages in thread
From: Greg Kroah-Hartman @ 2019-09-04 12:07 UTC (permalink / raw)
  To: Heikki Krogerus
  Cc: Rafael J. Wysocki, linux-kernel, kbuild test robot, Dan Carpenter

On Fri, Aug 30, 2019 at 10:51:56AM +0300, Heikki Krogerus wrote:
> 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: 1666faedb567 ("software node: Add software_node_get_reference_args()")
> 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>

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v3 1/2] software node: Initialize the return value in software_node_to_swnode()
  2019-09-04 12:07   ` Greg Kroah-Hartman
@ 2019-09-04 21:03     ` Rafael J. Wysocki
  0 siblings, 0 replies; 7+ messages in thread
From: Rafael J. Wysocki @ 2019-09-04 21:03 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Heikki Krogerus
  Cc: Rafael J. Wysocki, Linux Kernel Mailing List, kbuild test robot,
	Dan Carpenter

On Wed, Sep 4, 2019 at 2:07 PM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> On Fri, Aug 30, 2019 at 10:51:55AM +0300, Heikki Krogerus wrote:
> > 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 <lkp@intel.com>
> > Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> > Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
>
> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Applied, thanks!

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v3 2/2] software node: Initialize the return value in software_node_find_by_name()
  2019-09-04 12:07   ` Greg Kroah-Hartman
@ 2019-09-04 21:06     ` Rafael J. Wysocki
  0 siblings, 0 replies; 7+ messages in thread
From: Rafael J. Wysocki @ 2019-09-04 21:06 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Heikki Krogerus
  Cc: Rafael J. Wysocki, Linux Kernel Mailing List, kbuild test robot,
	Dan Carpenter

On Wed, Sep 4, 2019 at 2:07 PM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> On Fri, Aug 30, 2019 at 10:51:56AM +0300, Heikki Krogerus wrote:
> > 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: 1666faedb567 ("software node: Add software_node_get_reference_args()")
> > 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>
>
> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Applied, thanks!

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-09-04 21:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-30  7:51 [PATCH v3 0/2] software nodes: Fix use of potentially uninitialized variable Heikki Krogerus
2019-08-30  7:51 ` [PATCH v3 1/2] software node: Initialize the return value in software_node_to_swnode() Heikki Krogerus
2019-09-04 12:07   ` Greg Kroah-Hartman
2019-09-04 21:03     ` Rafael J. Wysocki
2019-08-30  7:51 ` [PATCH v3 2/2] software node: Initialize the return value in software_node_find_by_name() Heikki Krogerus
2019-09-04 12:07   ` Greg Kroah-Hartman
2019-09-04 21:06     ` Rafael J. Wysocki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.