lkml.org 
[lkml]   [2018]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 1/4] misc/ioc4: Return -ENOMEM after a failed kmalloc() in ioc4_probe()
From
Date
From: Markus Elfring <elfring@users.sourceforge.net>
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@users.sourceforge.net>
---
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
\
 
 \ /
  Last update: 2018-01-14 23:17    [W:0.034 / U:0.864 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site