[PATCH 1/4] misc/ioc4: Return -ENOMEM after a failed kmalloc() in ioc4_probe()

From: SF Markus Elfring
Date: Mon Jan 08 2018 - 11:15:23 EST


From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 8 Jan 2018 16:12:52 +0100

Replace an error code for the indication of a memory allocation failure
in this function.

Fixes: 22329b511a97557b293583194037d1f4c71e1504 ("ioc4: Core driver rewrite")

Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
---
drivers/misc/ioc4.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/ioc4.c b/drivers/misc/ioc4.c
index ec0832278170..63a64104d2da 100644
--- a/drivers/misc/ioc4.c
+++ b/drivers/misc/ioc4.c
@@ -300,7 +300,7 @@ ioc4_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
printk(KERN_WARNING
"%s: Failed to allocate IOC4 data for pci_dev %s.\n",
__func__, pci_name(pdev));
- ret = -ENODEV;
+ ret = -ENOMEM;
goto out_idd;
}
idd->idd_pdev = pdev;
--
2.15.1