All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ipmi: missing error code in try_smi_init()
@ 2018-03-06  9:58 Dan Carpenter
  2018-03-06 10:03 ` Arnd Bergmann
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Dan Carpenter @ 2018-03-06  9:58 UTC (permalink / raw)
  To: kernel-janitors

If platform_device_alloc() then we should return -ENOMEM instead of
returning success.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index f2a294f78892..ff870aa91cfe 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -2071,6 +2071,7 @@ static int try_smi_init(struct smi_info *new_smi)
 						      new_smi->intf_num);
 		if (!new_smi->pdev) {
 			pr_err(PFX "Unable to allocate platform device\n");
+			rv = -ENOMEM;
 			goto out_err;
 		}
 		new_smi->io.dev = &new_smi->pdev->dev;

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

end of thread, other threads:[~2018-03-06 13:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-06  9:58 [PATCH] ipmi: missing error code in try_smi_init() Dan Carpenter
2018-03-06 10:03 ` Arnd Bergmann
2018-03-06 10:26 ` Julia Lawall
2018-03-06 10:38 ` Dan Carpenter
2018-03-06 13:20 ` Corey Minyard

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.