Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;