diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2018-03-06 04:58:03 -0500 |
---|---|---|
committer | Corey Minyard <cminyard@mvista.com> | 2018-03-06 20:47:52 -0500 |
commit | 532ed9264da27eb3062f49e4283f9b393a8e17d0 (patch) | |
tree | ad35bc290f893c052ab760ee0b91e1fa49be6c55 | |
parent | e8824babad2d81fcff43e02f028cc437a3f99ce5 (diff) |
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>
-rw-r--r-- | drivers/char/ipmi/ipmi_si_intf.c | 1 |
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) | |||
2071 | new_smi->intf_num); | 2071 | new_smi->intf_num); |
2072 | if (!new_smi->pdev) { | 2072 | if (!new_smi->pdev) { |
2073 | pr_err(PFX "Unable to allocate platform device\n"); | 2073 | pr_err(PFX "Unable to allocate platform device\n"); |
2074 | rv = -ENOMEM; | ||
2074 | goto out_err; | 2075 | goto out_err; |
2075 | } | 2076 | } |
2076 | new_smi->io.dev = &new_smi->pdev->dev; | 2077 | new_smi->io.dev = &new_smi->pdev->dev; |