Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754812AbcDKQup (ORCPT ); Mon, 11 Apr 2016 12:50:45 -0400 Received: from mail-bn1bon0074.outbound.protection.outlook.com ([157.56.111.74]:32416 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754750AbcDKQun (ORCPT ); Mon, 11 Apr 2016 12:50:43 -0400 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=none action=none header.from=nxp.com; From: Stuart Yoder To: , CC: , , , , , =?UTF-8?q?Horia=20Geant=C4=83?= , Stuart Yoder Subject: [PATCH 13/14] staging: fsl-mc: return -EINVAL for all fsl_mc_portal_allocate() failures Date: Mon, 11 Apr 2016 11:50:39 -0500 Message-ID: <1460393439-16190-1-git-send-email-stuart.yoder@nxp.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131048670414838724;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.168.50;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(11100500001)(6806005)(33646002)(86362001)(5820100001)(104016004)(81166005)(106466001)(105606002)(23676002)(189998001)(5001770100001)(50226001)(92566002)(50986999)(19580395003)(4326007)(19580405001)(50466002)(47776003)(5008740100001)(586003)(87936001)(77096005)(2906002)(2870700001)(36756003)(1096002)(1220700001)(7059030)(4720700001);DIR:OUT;SFP:1101;SCL:1;SRVR:BN1PR0301MB0708;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;MLV:sfv;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11FD019;1:QUJvy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B+8ErS2sDpTSwas1OBjhl4514bwifX3Vs2OZMh2+NFy5RJaXY/NxOru/Iq84Ju9o660154DhYozXbzUV19nJm+bv6wN760AKLgHI2HNMr8uK1V4ECD5mx+nTJtamsUTFST4gXButk7NHsLwwtd0bw5tL0DVNnohpunCC4PRMVxDNPLQBFa53lEcEh9Mc2pwqr6g9EJf1VE=;25:sruhJpK8pgN/Z0BunuHjvUUdMpAivLG7IB2BWMvmodQKGptqFLwk4z7erxYqgwH7swgd46wvvOHmf5Xz0E0CXrFjpGCgSMe7oCWh/6Kdp22VFtVcdTfTuyM1GrZwD+KMbcSMZMrxpQOrpF/lxcVYn0qPNKHvvxdaB8fnoOFTa2sB80+7hHB3aLMyUlgp9L+7MYMwwfnkqXPzZQhY3vgbmzXDBSjgB7RrwtB7AxwdtMLW2wlteFGpUVwTCwS9BIZpe0ksHxlzN8E4k8NREIdxPXroRxJE4ZDl4lV5Lx9dA6UtVHCHiBpy/PFTpn10IVUgVzkJ7dcA4LeSh5X3crHjPQ== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN1PR0301MB0708; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(13018025)(13017025)(13015025)(13024025)(13023025)(8121501046)(10201501046)(3002001)(6055026);SRVR:BN1PR0301MB0708;BCL:0;PCL:0;RULEID:(400006);SRVR:BN1PR0301MB0708; X-Microsoft-Exchange-Diagnostics: 1;BN1PR0301MB0708;4:s9Bini9RoACiDeTgBLkunFA0+WNvx3gDmCfUt5Nt+XzFrlxnfk8i//VfHcd0dgPBK75uFuez88wJz35nXE/KKzsCj/fWmRcxj9X85kQj9T0I1GuDHOYaFPgbPuSfsVA1C7Kb/Qw6FccerUrHhJp4+8/q2igrgP+Gmo+oSCXSyiZrPP6hmNZzakKjzV6x+B4HvCucDgpTdgERdZmRBMoNXSL1Ye4d+c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VWOE/gk3s1XntMhYhRvMSdSCOt/J3YUZ2A62hIU11OtvLHe7lCz0lZhfQqiUqC2wE6dSatteYVCU=;24:cWXaf+o4idMcxwiE5vdon8iDNuyidFBhrsJnPb/1LhWGOxsc/ULTW7BqU0+O2q26v4CdMrbsY4IKeyHDHUZ39r2/E+oqKNuTt6DzSsujZdk= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Apr 2016 16:50:41.2966 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR0301MB0708 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 828 Lines: 25 From: Horia Geantă There are some error paths that allow for a NULL new_mc_io and err = 0 return code. Return -EINVAL instead. Signed-off-by: Horia Geantă Signed-off-by: Stuart Yoder --- drivers/staging/fsl-mc/bus/mc-allocator.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/fsl-mc/bus/mc-allocator.c b/drivers/staging/fsl-mc/bus/mc-allocator.c index 4676ba1..7ee71e7 100644 --- a/drivers/staging/fsl-mc/bus/mc-allocator.c +++ b/drivers/staging/fsl-mc/bus/mc-allocator.c @@ -306,6 +306,7 @@ int __must_check fsl_mc_portal_allocate(struct fsl_mc_device *mc_dev, if (error < 0) return error; + error = -EINVAL; dpmcp_dev = resource->data; if (WARN_ON(!dpmcp_dev)) goto error_cleanup_resource; -- 1.7.9.5