Received: by 10.223.164.202 with SMTP id h10csp877876wrb; Fri, 17 Nov 2017 10:04:30 -0800 (PST) X-Google-Smtp-Source: AGs4zMY3lwl2MMAMPwRBWhNJeQzjZiLLmllzf8TMYgGCY84eW9mcZ8fj2mm+6ojRXI2ZCzOr91Z8 X-Received: by 10.159.252.138 with SMTP id bb10mr5883187plb.163.1510941870237; Fri, 17 Nov 2017 10:04:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510941870; cv=none; d=google.com; s=arc-20160816; b=QEnhYVS0K+X6Bqx2SMdhPYqT0sjCZybimHnfsGzMlXWJfTRQ90cc1dcqdQqRj1RIlk ZV4s6yvXT2qzPMmG5H/zpOPJ05BqA6nH6WdB78M6O5mFuhA1A4KfnrGHIC7ArT0C8n4h Dku9zGhCu5sY7guBxxt3E/efMUuxUbNvddXANc/RhKJaq0KZ2h51AYalUY2dqRgoMGjR lA3zdFQf3axJ3bKqM33aocXVAkPvXBMk8zm1DqUtcpcVLXSShvhz79H0VTBAhziXcvgs +NnQ17LTeJAolFrhfXwG+MPgQa3TMhnvbGdgku3XezBjI58//0WOWJUBA3OCQhtaqzKm 6ixA== 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=g+YPqagX4VyCN+lwe/FUgjeiL+teEwHtO8OcZHrrvvo=; b=Xw5HlqKW7gh5DdKlxzVi07iKH3+1ywP4RoshW3fTMhR0hUw5vhIkwgsLkhxc02fFpX QtRGiMpt7BoOA2hBfsdfg9T/D4UZEmcAYHr9xhHxxrKfkqF7Aa18dAX+daXLQPuQn+uT 5mAlTl4HtC5kIxe0Lg6BgvOzAfqu/U1DjRD8PkYMHBtKH0uEuPrW432eEFUNKU5vES1O MWIwu/JNDAsIVCuNVIkekNcwQRQ+KxBQQIt76iRgJ8ytueI2TGjaBXPqExpOwexRHMmM KG7PwG45mVy5d5rpaSHLNXV8zlVCV/djbnNIZ06GVe+eJP/ti/NIRyJQzrE1Gp7mpnqY mKpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=G1EO/U8G; 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 g11si3057818pgq.339.2017.11.17.10.04.16; Fri, 17 Nov 2017 10:04:30 -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=G1EO/U8G; 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 S1753823AbdKQLZ4 (ORCPT + 92 others); Fri, 17 Nov 2017 06:25:56 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:33352 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753778AbdKQLZu (ORCPT ); Fri, 17 Nov 2017 06:25:50 -0500 Received: by mail-pg0-f68.google.com with SMTP id s75so1774568pgs.0 for ; Fri, 17 Nov 2017 03:25:50 -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=g+YPqagX4VyCN+lwe/FUgjeiL+teEwHtO8OcZHrrvvo=; b=G1EO/U8Gi3igSiyAn4DqCuLlwB+l3D6kB8GlAwpN0F0kzmBc6euVOACy9HhNAaAWn2 5TNMeuDY3au5K9ImHiCTk7l7u4aavDocYboB0EI0Gwl0ibp1hBvWWiTios1Zg+d1zv37 XlIIj4q7EJTmGUo4WPtu/2/DeUr+0R9s5PiDqr8OlT6uCC2KzDwdZT80XltX7a9SILZj Th/T5iTurliNie7sNvLTLFM835RYiWFkMZPdjFf4x5InynZy7KhyZI+0nFmZwi4nA/y2 YsO37812Cc6Awl7eK1HM835x4lnRma9qKOMqtdmJYEbxI29uhLNuv6+GQ/+7dZEKBqJE mNnQ== 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=g+YPqagX4VyCN+lwe/FUgjeiL+teEwHtO8OcZHrrvvo=; b=h5kWLyoJZ68C7xufXY5A+6Vei+kuX4+jP1huGz+XNELe73GSihpdXcVNzaqRVt/h0T FGUwrF3ICQNJ11shJnk1cQfUONBihd+8G5z8U6Cvl7YsyLE/bbz4cpQ+aZo8fvzpBnj5 0NCCNHuMz4cYmOl6Nl8AjyUyLSHMuiDUXbYkel2aD+wRDl1xd302ScYbFtUJRxmZ80JD ttQ3GgNOpbZAhvk/8fx3xRKrVjXcYs5fzqg8zKxf4uh4LdlXcz1hhmqG0DebgSrlTKlP wwVF+Q1Pa+Pf+qym6hoOQQ/8WnOAJf6mQ+tBrUp7l2iclP+R0CgBY1mmKGrj3YfwwcOk sjoQ== X-Gm-Message-State: AJaThX4mlmFXmdlhLwOz/m5mvBLp5n6CBI09/bK4UN2crlq20OAWYWCm kSRL1xJnhsbqXTakPf2YOhM= X-Received: by 10.99.67.195 with SMTP id q186mr4646653pga.186.1510917950168; Fri, 17 Nov 2017 03:25:50 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id z2sm4356538pfh.39.2017.11.17.03.25.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Nov 2017 03:25:49 -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 v2] phy: cpcap-usb: Fix platform_get_irq_byname's error checking. Date: Fri, 17 Nov 2017 16:55:35 +0530 Message-Id: <115b1328cd921849e8a3dd1832c21a3de59aa0e0.1510917723.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 negative 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 --- changes in v1 : Patch description was not correct. 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 1584336515094340855@xxx Fri Nov 17 17:50:42 +0000 2017 X-GM-THRID: 1584268831442657910 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread