Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934661AbeAHQPT (ORCPT + 1 other); Mon, 8 Jan 2018 11:15:19 -0500 Received: from mout.web.de ([212.227.15.14]:64513 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756091AbeAHQPS (ORCPT ); Mon, 8 Jan 2018 11:15:18 -0500 Subject: [PATCH 1/4] misc/ioc4: Return -ENOMEM after a failed kmalloc() in ioc4_probe() From: SF Markus Elfring To: kernel-janitors@vger.kernel.org, Andrew Morton , Arnd Bergmann , Brent Casavant , Greg Kroah-Hartman , Jeremy Higdon , Pat Gefre Cc: LKML References: <4fb26753-2ae3-7c17-7777-03c6923a1d4b@users.sourceforge.net> Message-ID: <5a181819-168a-5b16-858a-7026071e0a93@users.sourceforge.net> Date: Mon, 8 Jan 2018 17:15:01 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <4fb26753-2ae3-7c17-7777-03c6923a1d4b@users.sourceforge.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:H31u28D4cJnBs6SNHMta87LF9gghAsLYT48iWIkEGUuweeLEqMN 1b6pIHG19QEOoNyQLVpU7R0adVAZKnJwb0IolxrfMxGgpa0ADb4KKkKz/r7uJVkBeugfLRl W406zTwf6kd8G3HQs7pZYDjvsrFH0qUma3pwLWrwv2iS9CXiLSX6qaFislyJ6I4F/yMGcIZ LL1KIv/AYvQfcTK0zoSKg== X-UI-Out-Filterresults: notjunk:1;V01:K0:AuC0Lyh/QRA=:BN9U23i+wvYzvsW8CRbN4B 9KIuLqLpANPV80dPZDEk8M2o9OsjYzgmyB9Ome1JIUkEZN8MoxRMsygxqGuQ1jSALvQEvIbKT vwjCiKVXNCMIFLcxZQWAlP1/WsmwcGxVK6G63G+qNwStFsY3V7ORYa4WH4E2wNALZ2eVuCnC2 im39238Dnq7jx9p7nzjyJ+Lr92xFZ+6sTncAkv7cQOfrsep2OulGDfDCEl3WaGlif+ANakzrZ slPRP7r5gSkX2kAiC4EGRhpRDUT7nHE4IMDi9uni0PFnvAWdMCOOwm0lDrcnChKtFHrwaKC+/ CeaBSIWg9UknLEdZCDNr4gh2LKjNbmuvCCYRd4aJqr5aF41auH6OT75EXZ0MkPebApX8aXUyJ 2Q1NRMtq1EyKaXUc7FWMqh2PF0lzoImpSUd7LlRTvYw11e6ky0AHkP2PqhK1Sc+jb/k9m4xfU BQagS5KLDUfHXLY237tmsFEaAxsVhkZS93lHlUXt0KxzW7q1OdUkSB8IIfpKA4rSBhp4GwaTf ivMNvJMzjtl/Cc02u/pBxmL1sx62TlMQc6Sl42LW+fhLQsMqRVQa8wfxg11Nu/OnfGU/xF6j5 CfZNcm9iwTg4YQxcPHOgT4GVsfK49GmqR/+ixvjJHaFrTXK/0ueaan2GScrwUcUGTzlOe59+S MJpd0wQj9A7ewUxtgs+PBQr068IRzsQfJ3eFxpO6u8C3e8wmKkPmui5tB3YkW4UUI7YvuA2vt m7RPzJIS6WewuLOKonCmumNlugCa78n7zSwvj0fpqOfm2NAw+Z0Wz/Byeb9YwgDhdve9nvV0u mU6sZLAPXBOOw3c7dmD052ZoYaiqwqyCY9vrAA3MoluC4F1XGo= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: From: Markus Elfring 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 --- 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