Received: by 10.223.164.202 with SMTP id h10csp1010538wrb; Fri, 17 Nov 2017 12:19:05 -0800 (PST) X-Google-Smtp-Source: AGs4zMZSvXHyvEj032xUw/bpuTph6DaGamrOqXIVy4Vq4/4nxah/ONeNKyuAYJM5v3s48rweK+mI X-Received: by 10.99.179.5 with SMTP id i5mr5900457pgf.199.1510949945789; Fri, 17 Nov 2017 12:19:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510949945; cv=none; d=google.com; s=arc-20160816; b=Qb3fFOVe+7y89qQzCgFj7LUqy0L5pZ9tJQZ0vgLKFfTJ4LNbyt3vzXptEwiQ4sK1eH D6wXsEqngKyg72D7IKxEq6/FluhLIGo9ueGVeTRzXWVNf7cZAVAUCD/XgVMCbRh33qF2 QKvkJALWmIfYX40zOus/tJs/8qcVIcXOMLUW7yxTzr+03tzcfxnP6GoEionQLjb71X0w okB/KVDULK6KvA5ae/OM3cf6wXRgxW/62i+S0B7SpN/4qKh0nIsU/hOiIlLMUNjdxPt4 eBolq4/EbJPDjND4Z7B9VyfruZIUvMTBW/388xlbvfQRTkms72ZK7XYS2Un61Y5mjetx AB/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=1CWAzrYsGtnGcoeVBs1u+Ate3+gBpwzhC9oIAo0UVjo=; b=FD64BVQZaVoe+n2nTmT1QFpVFYrkAA36WqEs+osYQXCsKaezzVatBjuOdl9NBWOLXA xl+KgtZq32MLd95C7vJZe+pvudfNyGrPwSmlZ+87J5L2EFfP58bPEJoEChGEkyxde3E/ FUaovlWbiPxM+MP6wwMwEgvAA2B5wfdPTp79sy5Ry4Dg0Zc1pbS91HeLkzF9eV6nLgZR axc9VGEscql1ViPxTw2v6ZERoQrT8K7NRcAYpQ0pT0ExwKuKYwK3gqp0Jsdqt9LljXI2 U8gmNXu9S3AfLsC55KCIU7QxbdvQpTaU0qNbwl+s3sg8grwkSLSlJ40vcPyO3EpXvolj eWwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Si5HLOiR; 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=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v21si3247837pgn.749.2017.11.17.12.18.52; Fri, 17 Nov 2017 12:19:05 -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=@gmail.com header.s=20161025 header.b=Si5HLOiR; 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=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932295AbdKQLTQ (ORCPT + 92 others); Fri, 17 Nov 2017 06:19:16 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:42316 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753505AbdKQLSy (ORCPT ); Fri, 17 Nov 2017 06:18:54 -0500 Received: by mail-pg0-f67.google.com with SMTP id j16so1743799pgn.9 for ; Fri, 17 Nov 2017 03:18:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=1CWAzrYsGtnGcoeVBs1u+Ate3+gBpwzhC9oIAo0UVjo=; b=Si5HLOiReT09qKUSAF95VYibc4/tqm4+hHoK240IyMnlpYQo/TUWRDB/U6Z+8IVGJj liwqzCHBqIuUwQpwJUEvRuPx8BCdh2XKE2z9wxOqBArAXA6VzO/uvXHW48ZWLq4N19+l +dVvVLGmcDUh5CWRzj3aqXeTn6yuXIyxH8GPm7yezW91Osasl/qLlpi2xCwN95uKmPkx PxTWa2lcO2CEyQMcICk6gzKa2DHdc+PPjzUYgdrSLNgqpEBuMp2vQre7/FWT9cVzI58/ Ne5XYvA1wKIuxRlrrXnREbUevpHdQ+LSc8qeqa1+gMwdGSM5g3pvzlqBbDY8M+j+DJDo qudg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=1CWAzrYsGtnGcoeVBs1u+Ate3+gBpwzhC9oIAo0UVjo=; b=idwYcmWqqDKqd4GjLeb4y5YI+uhZlrf94tlHoMGXCO2uLejoCGCvjYSs9M7Cfhjqmw dRcDoZaHCM9ChZGWw8aywt1Ix+1RNUSnSG16ciofmGqrXfjmvdGBH1OOZsgJH7+JHf57 pU7hanJ1Gh2yU0ExYRgRFbmqofP/5EFGI4nObaSLcruSJ3mT4x+lXDFS2KYHDSuviBGr o3bcTtjcKRDMuKnL/XVTGZG/V3EdO9Pz8CCO/npneX+JflxvSE/aFAvUJXtZL/JZjypQ Ddwpmk+gC9tNzkEyEaEK9+potmjJgO8J0F5GtTHD+n8SL5jgF/P2iFMh7Cwbf/qHgxVf PfFA== X-Gm-Message-State: AJaThX6KXgitXjBrnwIywfVf3+yjlmiSjb1WCCAWgaYr/6i0iME6eCrM lnyCsjQheSM+YfY0B38Jy3I= X-Received: by 10.84.174.129 with SMTP id r1mr4998462plb.337.1510917533948; Fri, 17 Nov 2017 03:18:53 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id r16sm5508357pgt.72.2017.11.17.03.18.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Nov 2017 03:18:52 -0800 (PST) From: Arvind Yadav To: kishon@ti.com, tony@atomide.com, robh@kernel.org, dan.carpenter@oracle.com Cc: linux-kernel@vger.kernel.org Subject: [PATCH] phy: cpcap-usb: Fix platform_get_irq_byname's error checking Date: Fri, 17 Nov 2017 16:48:43 +0530 Message-Id: <115b1328cd921849e8a3dd1832c21a3de59aa0e0.1510917305.git.arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The platform_get_irq_byname() function returns -1 if an error occurs. zero or positive number on success. platform_get_irq_byname() error checking for zero is not correct. Signed-off-by: Arvind Yadav --- 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/phy-cpcap-usb.c index accaaac..6601ad0 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 *pdev, int irq, error; irq = platform_get_irq_byname(pdev, name); - if (!irq) + if (irq < 0) return -ENODEV; error = devm_request_threaded_irq(ddata->dev, irq, NULL, -- 2.7.4 From 1584311948523099257@xxx Fri Nov 17 11:20:14 +0000 2017 X-GM-THRID: 1584311948523099257 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread