From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751347AbcGNNNV (ORCPT ); Thu, 14 Jul 2016 09:13:21 -0400 Received: from mail-sn1nam02on0041.outbound.protection.outlook.com ([104.47.36.41]:46112 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751190AbcGNNNS (ORCPT ); Thu, 14 Jul 2016 09:13:18 -0400 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Date: Thu, 14 Jul 2016 06:12:49 -0700 From: =?utf-8?B?U8O2cmVu?= Brinkmann To: Christophe JAILLET CC: , , , , , , , , , , , , Subject: Re: [PATCH] PCI: xilinx: Fix return value in case of error Message-ID: <20160714131249.GJ3847@xsjsorenbubuntu> References: <1468491046-1427-1-git-send-email-christophe.jaillet@wanadoo.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1468491046-1427-1-git-send-email-christophe.jaillet@wanadoo.fr> User-Agent: Mutt/1.5.24 (2015-08-30) X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-22450.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.100;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(7916002)(2980300002)(438002)(199003)(24454002)(377424004)(189002)(586003)(19580405001)(19580395003)(76506005)(63266004)(57986006)(83506001)(47776003)(85182001)(87936001)(2906002)(4326007)(1076002)(11100500001)(189998001)(356003)(110136002)(23676002)(7846002)(92566002)(305945005)(86362001)(8936002)(8676002)(33716001)(81166006)(81156014)(50466002)(85202003)(2870700001)(77096005)(106466001)(36386004)(33656002)(4001350100001)(54356999)(2950100001)(50986999)(9686002)(76176999)(9786002)(18370500001)(107986001)(5001870100001);DIR:OUT;SFP:1101;SCL:1;SRVR:SN1NAM02HT198;H:xsj-pvapsmtpgw02;FPR:;SPF:Pass;PTR:unknown-60-100.xilinx.com,xapps1.xilinx.com;A:1;MX:1;CAT:NONE;LANG:en;CAT:NONE; X-MS-Office365-Filtering-Correlation-Id: ba204c6f-57fe-4513-3a7f-08d3abe89d8b X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(8251501002);SRVR:SN1NAM02HT198; X-Microsoft-Antispam-PRVS: <4af84265f25e4d77ac60d80634580f15@SN1NAM02HT198.eop-nam02.prod.protection.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(192813158149592)(155761271638844); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(8121501046)(13024025)(13023025)(13017025)(13015025)(5005006)(13018025)(3002001)(10201501046)(6055026);SRVR:SN1NAM02HT198;BCL:0;PCL:0;RULEID:;SRVR:SN1NAM02HT198; X-Forefront-PRVS: 00032065B2 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jul 2016 13:13:14.8593 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.100];Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1NAM02HT198 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2016-07-14 at 12:10:46 +0200, Christophe JAILLET wrote: > In function 'xilinx_pcie_init_irq_domain', the pattern used to check and > return error is: > > if (!var) { > dev_err(...); > return PTR_ERR(var); > } > > So the returned value in case of error is always 0, which means 'success'. > Change it to return -ENODEV instead. > > Signed-off-by: Christophe JAILLET Acked-by: Sören Brinkmann Sören