summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2018-03-06 12:58:03 +0300
committerCorey Minyard <cminyard@mvista.com>2018-03-06 19:47:52 -0600
commit532ed9264da27eb3062f49e4283f9b393a8e17d0 (patch)
treead35bc290f893c052ab760ee0b91e1fa49be6c55 /drivers/char
parente8824babad2d81fcff43e02f028cc437a3f99ce5 (diff)
downloadlinux-532ed9264da27eb3062f49e4283f9b393a8e17d0.tar.bz2
ipmi: missing error code in try_smi_init()
If platform_device_alloc() then we should return -ENOMEM instead of returning success. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Corey Minyard <cminyard@mvista.com>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/ipmi/ipmi_si_intf.c1
1 files changed, 1 insertions, 0 deletions
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;