Received: by 10.223.176.5 with SMTP id f5csp822175wra; Sat, 3 Feb 2018 11:04:53 -0800 (PST) X-Google-Smtp-Source: AH8x227VlHDyTIO50s0t35wJkJSr6nlKf/W5NTH8SkwAZtu4wdiURx+yiGImMeKpigZHD5HFaFHY X-Received: by 10.101.83.3 with SMTP id m3mr891821pgq.396.1517684693766; Sat, 03 Feb 2018 11:04:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517684693; cv=none; d=google.com; s=arc-20160816; b=oaO/QI01jjJNokz6vdluy9PkxzLjf8hwAqGpE2SKsgN8Gp7Yf9gS2l0OKFpK1vXe3q eqO133pHFM0twsC8wXfN6RexsuqzyGCWpvV2Qq5LBOTSsXkh2ORGZ0Tn0q2RCDPthikm pOGSMmzyiMe7vPLjYs745QotV/3FiG1AolfPEa+L/zdm9Y55r5e84p6D74CRnqpJZDj1 yfo1Ie6lCEByHVTtmI+GLgxn3gO7gMkOdNapQy1REkN09Ae+Ti2t7tC1IO7WhDNa+CRg 2rUi3WtDf6MVzavCQLVC9GxyyhAIHJ738X0FhhWzCAtAbbFiu7Gn/RAxO1C6MwSuxr5Z sYrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=tth9vff280XUNGzVJAgSvu6WTZRCt5RFEn+/OmK+LD4=; b=sQbwsNQK7I/1jdtsz4PsNTUjSjPTo7jj8oClIrELPp1NSeiuoFUySCGdWWybFLAKJ0 IICD6xe7Bpds3S6G40ojxuAl6iU+chn01NAtt2kS+D0Ql2MbKT8dWV0jsCsCfUpmLzAp m91pdhGOGy7vpG/XrUKbyEdMjl5rfUiSyvXVckbz/tka8T6IY4F2ZOtZg5X6efeNxua5 kUqNI/howCjA+ErRfNTYXz5t7wTCzzvVrzU+julv5O0cK26TFXzAm+jHBCA48Fg0sBrk j6+h9sVSlcl9NfJmd/f7UE63QrfA4kTUYA/4MDQG2Kij+k1OOaXxe3luYoqhzWtLF+X9 2n2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=Ld31TvwJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z23-v6si2305400pll.4.2018.02.03.11.04.39; Sat, 03 Feb 2018 11:04:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=Ld31TvwJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752920AbeBCSBb (ORCPT + 99 others); Sat, 3 Feb 2018 13:01:31 -0500 Received: from mail-bn3nam01on0138.outbound.protection.outlook.com ([104.47.33.138]:24890 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752235AbeBCSAj (ORCPT ); Sat, 3 Feb 2018 13:00:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=tth9vff280XUNGzVJAgSvu6WTZRCt5RFEn+/OmK+LD4=; b=Ld31TvwJ1R2OgNRoYMnTvhpKDKTo2UADdaYC7Plik5Zf5eKwfR+aZNBoNo9W3CCNBJFyuDitfpx8CNcyhg8B6faZWHKuBN3Wu2BsIWYuA0uAykcus3UZswPRCjNBWTBkWtST8SWnv3ie+ufthW85hjo263PoB5oYLos6hbQUNjA= Received: from BL0PR2101MB1027.namprd21.prod.outlook.com (52.132.20.161) by BL0PR2101MB1043.namprd21.prod.outlook.com (52.132.24.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.506.3; Sat, 3 Feb 2018 18:00:32 +0000 Received: from BL0PR2101MB1027.namprd21.prod.outlook.com ([fe80::a8da:b5d9:d710:9bf9]) by BL0PR2101MB1027.namprd21.prod.outlook.com ([fe80::a8da:b5d9:d710:9bf9%3]) with mapi id 15.20.0485.006; Sat, 3 Feb 2018 18:00:32 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Arvind Yadav , Kishon Vijay Abraham I , Sasha Levin Subject: [PATCH AUTOSEL for 4.14 007/110] phy: cpcap-usb: Fix platform_get_irq_byname's error checking. Thread-Topic: [PATCH AUTOSEL for 4.14 007/110] phy: cpcap-usb: Fix platform_get_irq_byname's error checking. Thread-Index: AQHTnRjgRXZMm53aSUKcgH+Ups8MoA== Date: Sat, 3 Feb 2018 18:00:29 +0000 Message-ID: <20180203180015.29073-7-alexander.levin@microsoft.com> References: <20180203180015.29073-1-alexander.levin@microsoft.com> In-Reply-To: <20180203180015.29073-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BL0PR2101MB1043;7:Klfo0xVDHe0ehFV+Tyqy+MdLa8ZMYTeMHsdse+PRhvxlOPbqLRuTFegPG6EOcpqNYqyRlbFJmcTevNUdrJSQdaCmhDfttE6/0YaVsnHnuH03JJY1MyOXDO/8NOCJz35Mv/XXF65UsevatDSo2+qL90nJcJnoEr/LkB0S4pg0j9HJIBzXMscuz/Q0J1ULrJhHdtXHzv4rMi/cxY08ApPwZLvD4T6q1wWJNRg+6t8IljaxxeS+lePuq2r5yLqr53jb x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 9fcfdcb3-5ac4-4d94-0c88-08d56b30047a x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(2017052603307)(7193020);SRVR:BL0PR2101MB1043; x-ms-traffictypediagnostic: BL0PR2101MB1043: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(31051911155226)(89211679590171)(85827821059158); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(61425038)(6040501)(2401047)(5005006)(8121501046)(3231101)(2400082)(944501161)(93006095)(93001095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(6072148)(201708071742011);SRVR:BL0PR2101MB1043;BCL:0;PCL:0;RULEID:;SRVR:BL0PR2101MB1043; x-forefront-prvs: 05724A8921 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39380400002)(376002)(39860400002)(366004)(346002)(396003)(189003)(199004)(59450400001)(10290500003)(186003)(6486002)(14454004)(1076002)(102836004)(6506007)(76176011)(26005)(6346003)(66066001)(10090500001)(5250100002)(36756003)(6512007)(2501003)(110136005)(99286004)(54906003)(478600001)(53936002)(72206003)(6436002)(316002)(305945005)(7736002)(6666003)(2950100002)(2906002)(5660300001)(4326008)(106356001)(575784001)(86362001)(97736004)(25786009)(22452003)(39060400002)(2900100001)(3846002)(107886003)(8676002)(8936002)(6116002)(3280700002)(105586002)(81156014)(81166006)(3660700001)(86612001)(68736007)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:BL0PR2101MB1043;H:BL0PR2101MB1027.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: qtSd5dOUQLlktRmpC8woLdqMWYKnoT7hTIpxLuBeoQOG+b3DfNmWdxH+mYMDW98g9ciWDKFcKd9fgoOy+VVd0g== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9fcfdcb3-5ac4-4d94-0c88-08d56b30047a X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Feb 2018 18:00:29.5190 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR2101MB1043 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arvind Yadav [ Upstream commit e796cc6a3a9186c92092e2f5929cf8f65b56cf01 ] The platform_get_irq_byname() function returns negative if an error occurs. zero or positive number on success. platform_get_irq_byname() error checking for zero is not correct. Fixes: 6d6ce40f63af ("phy: cpcap-usb: Add CPCAP PMIC USB support") Signed-off-by: Arvind Yadav Reviewed-by: Sebastian Reichel Acked-by: Tony Lindgren Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Sasha Levin --- drivers/phy/motorola/phy-cpcap-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/motorola/phy-cpcap-usb.c b/drivers/phy/motorola/ph= y-cpcap-usb.c index accaaaccb662..6601ad0dfb3a 100644 --- a/drivers/phy/motorola/phy-cpcap-usb.c +++ b/drivers/phy/motorola/phy-cpcap-usb.c @@ -310,7 +310,7 @@ static int cpcap_usb_init_irq(struct platform_device *p= dev, int irq, error; =20 irq =3D platform_get_irq_byname(pdev, name); - if (!irq) + if (irq < 0) return -ENODEV; =20 error =3D devm_request_threaded_irq(ddata->dev, irq, NULL, --=20 2.11.0