linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [tip: x86/platform] x86/platform/uv: Fix an error code in uv_hubs_init()
       [not found] <jMAJb3H3iv@mwanda>
@ 2020-12-02 20:07 ` tip-bot2 for Dan Carpenter
  2020-12-03  8:01 ` tip-bot2 for Dan Carpenter
  1 sibling, 0 replies; 2+ messages in thread
From: tip-bot2 for Dan Carpenter @ 2020-12-02 20:07 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Dan Carpenter, Borislav Petkov, x86, linux-kernel

The following commit has been merged into the x86/platform branch of tip:

Commit-ID:     fa4a379ecfa0c735e8979bb732fe5a1705a64052
Gitweb:        https://git.kernel.org/tip/fa4a379ecfa0c735e8979bb732fe5a1705a64052
Author:        Dan Carpenter <dan.carpenter@oracle.com>
AuthorDate:    Wed, 02 Dec 2020 17:44:07 +03:00
Committer:     Borislav Petkov <bp@suse.de>
CommitterDate: Wed, 02 Dec 2020 20:51:53 +01:00

x86/platform/uv: Fix an error code in uv_hubs_init()

Return -ENOMEM on allocation failure instead of returning random stack
memory contents.

Fixes: 4fc2cf1f2daf ("x86/platform/uv: Add new uv_sysfs platform driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/X8eoN/jMAJb3H3iv@mwanda
---
 drivers/platform/x86/uv_sysfs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/platform/x86/uv_sysfs.c b/drivers/platform/x86/uv_sysfs.c
index 54c3425..e17ce8c 100644
--- a/drivers/platform/x86/uv_sysfs.c
+++ b/drivers/platform/x86/uv_sysfs.c
@@ -248,6 +248,7 @@ static int uv_hubs_init(void)
 		uv_hubs[i] = kzalloc(sizeof(*uv_hubs[i]), GFP_KERNEL);
 		if (!uv_hubs[i]) {
 			i--;
+			ret = -ENOMEM;
 			goto err_hubs;
 		}
 

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

* [tip: x86/platform] x86/platform/uv: Fix an error code in uv_hubs_init()
       [not found] <jMAJb3H3iv@mwanda>
  2020-12-02 20:07 ` [tip: x86/platform] x86/platform/uv: Fix an error code in uv_hubs_init() tip-bot2 for Dan Carpenter
@ 2020-12-03  8:01 ` tip-bot2 for Dan Carpenter
  1 sibling, 0 replies; 2+ messages in thread
From: tip-bot2 for Dan Carpenter @ 2020-12-03  8:01 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Dan Carpenter, Borislav Petkov, Justin Ernst, x86, linux-kernel

The following commit has been merged into the x86/platform branch of tip:

Commit-ID:     18d047bd89b8c1f9ba3c9b2d2f7309c953b3ce97
Gitweb:        https://git.kernel.org/tip/18d047bd89b8c1f9ba3c9b2d2f7309c953b3ce97
Author:        Dan Carpenter <dan.carpenter@oracle.com>
AuthorDate:    Wed, 02 Dec 2020 17:44:07 +03:00
Committer:     Borislav Petkov <bp@suse.de>
CommitterDate: Thu, 03 Dec 2020 08:51:06 +01:00

x86/platform/uv: Fix an error code in uv_hubs_init()

Return -ENOMEM on allocation failure instead of returning random stack
memory contents.

Fixes: 4fc2cf1f2daf ("x86/platform/uv: Add new uv_sysfs platform driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Justin Ernst <justin.ernst@hpe.com>
Link: https://lkml.kernel.org/r/X8eoN/jMAJb3H3iv@mwanda
---
 drivers/platform/x86/uv_sysfs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/platform/x86/uv_sysfs.c b/drivers/platform/x86/uv_sysfs.c
index 54c3425..e17ce8c 100644
--- a/drivers/platform/x86/uv_sysfs.c
+++ b/drivers/platform/x86/uv_sysfs.c
@@ -248,6 +248,7 @@ static int uv_hubs_init(void)
 		uv_hubs[i] = kzalloc(sizeof(*uv_hubs[i]), GFP_KERNEL);
 		if (!uv_hubs[i]) {
 			i--;
+			ret = -ENOMEM;
 			goto err_hubs;
 		}
 

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

end of thread, other threads:[~2020-12-03  8:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <jMAJb3H3iv@mwanda>
2020-12-02 20:07 ` [tip: x86/platform] x86/platform/uv: Fix an error code in uv_hubs_init() tip-bot2 for Dan Carpenter
2020-12-03  8:01 ` tip-bot2 for Dan Carpenter

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).