Commit 532ed926 authored by Dan Carpenter's avatar Dan Carpenter Committed by Corey Minyard

ipmi: missing error code in try_smi_init()

If platform_device_alloc() then we should return -ENOMEM instead of
returning success.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
parent e8824bab
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment