Received: by 10.223.164.202 with SMTP id h10csp2286385wrb; Sat, 18 Nov 2017 18:08:56 -0800 (PST) X-Google-Smtp-Source: AGs4zMa8Dz86A80rYmPvpHcufSkra3tmPkxsn7wCuU5SKtHyNE6yurbRmMHBbVNBIIMCI2VVHkC8 X-Received: by 10.98.155.22 with SMTP id r22mr6702890pfd.96.1511057336582; Sat, 18 Nov 2017 18:08:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511057336; cv=none; d=google.com; s=arc-20160816; b=qBIPbIetDE16WavDIewUjQqhIDvcmOoGCyIHjGEzGBNrj5pnBEWNN7wVZIEOyTJ48q xDLKOtq3n/fSf7E79nYauhuzcy977jM2OLRs8nTxkQF9FTb2GbpLWO4/PkhMDYfkqWbv XekQfBqA2PAoN+ZshqoCUKH5gw/ZnWdY3pzyCMqk5CMmGUMh4XKQaF5iAtqNJNOTrsyz FY095ZyTFUUywGPcLhfj7NKiQWYi2CvKQwb7K9cXHtA5k6JuVks1XRal/vcEKcDbXvTo p1pj234KGTSTMKOBva6mPafOYNK3Z5jeMYWPt3S/IHFn03CAwLUj8ml5bKligpHKWp31 vGHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=+pKQaodwpDUSVhGhx3pHDx9zJpxNo+K3tn5i4m+dNrU=; b=z1PsvkOUvWrF9nBr9qu0xKAJi1sHemHHlJQJePg9otMF8lL1lG1OlBc+3hwWCuQFs8 hH9NiUKT6MekKzWMA0zIfFLF2PNabZQEEDIU1kn6Iho40Xkgufshtz7CWJossBQzYAO0 3HhExyvYelJitfdhfdnV1Df7mrhe1V+oSA9j2hshhtBDY/r4djjRM+9p15LckC576FE4 RiDvjaGpobsJmgjBwTOD0nBy2tlWiCxJbI/3OzpZqh9GJac96YZ5y/HNPL1ZQmIANWIW jMflu2MYo+z2lBVR1aCjVOVqy2APqAQv70M9rjjN7wMcG/oh0I6b9JfdyO7geemptV9N PKPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pSZQCeMk; 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 t8si5351095plo.439.2017.11.18.18.08.43; Sat, 18 Nov 2017 18:08:56 -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=pSZQCeMk; 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 S1764232AbdKRFpB (ORCPT + 93 others); Sat, 18 Nov 2017 00:45:01 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:38517 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1763878AbdKRFok (ORCPT ); Sat, 18 Nov 2017 00:44:40 -0500 Received: by mail-pf0-f194.google.com with SMTP id r62so3482248pfd.5 for ; Fri, 17 Nov 2017 21:44:40 -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:in-reply-to:references; bh=+pKQaodwpDUSVhGhx3pHDx9zJpxNo+K3tn5i4m+dNrU=; b=pSZQCeMkBgFCWXUimbqSFEsjrbrf9EcHen5bW6UXCOdcg9UERssXp2Hqm0QEoxElET 68Ih4sM1i+E5iwjyIxoHRq0juRRxynvR9iN8n5d0QCd21cD9sZd2dYXvC2pWl9WjyIh3 uKsj2yCZ/ZRfnOZzIB/WF95ehijUKO/pDqvehe9uYR8nPb8eY6L1Pw+4Dz24ja+FeMaU 3ZhnrXkFVLyt+j+dUgP2RyPql5osYBojRL/6vLok5pBbZRVaeaxZD0zKWbIUjsCnBPPZ pvfQ3GhrxSRsG4/OFd2C5YO7IwsPzkcZr4RNDFJQsIQpkLJJ14Nt30ai7JdGyCVooMzf zO6g== 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:in-reply-to :references; bh=+pKQaodwpDUSVhGhx3pHDx9zJpxNo+K3tn5i4m+dNrU=; b=mIjtjm3o2r4CXL3gZGxyLdbNC5aqGM0ttHw1laaHhmLi8lx3/IgEqBozoxUFXA74XP mQk7aLclsoptAt5mNXu+MXU4ryDXNwNM2kMU4dJx68BuNMPJS0WfhDoaDIZBBIDQkERE 0oi4jxg8rxcy+/tniSoz/WacjC1J/YifRNrcbzr7Y0lj1fM2zATXbszXrMRWwXarblKC 8vC3WIGMPJ+hSrAsn7FS4tp/6qVtZeCOW12Diae7WH+W6vrVXYzph9jqlUDA3kVKgCvX XZVk7Jhv0nCmlXqXVNxL6pLfGMmeNt7RxWClFN3684O7JAdkG+D1uXPSsNlcczOa3SGN VIIQ== X-Gm-Message-State: AJaThX5sl1WwrfewCQOtISLXrRMGb8qjEUBlOFo3UvYrncsdVBeik7C7 5BohnubrhLk/EKkxVw58Ycw= X-Received: by 10.98.32.206 with SMTP id m75mr4419040pfj.231.1510983879797; Fri, 17 Nov 2017 21:44:39 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id h1sm8923492pgf.37.2017.11.17.21.44.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Nov 2017 21:44:39 -0800 (PST) From: Arvind Yadav To: arnd@arndb.de, gregkh@linuxfoundation.org, joel@jms.id.au, nicolas.ferre@microchip.com, alexandre.belloni@free-electrons.com Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/2] misc: aspeed-lpc-snoop: Fix platform_get_irq's error checking Date: Sat, 18 Nov 2017 11:14:26 +0530 Message-Id: <1510983867-2344-2-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510983867-2344-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1510983867-2344-1-git-send-email-arvind.yadav.cs@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The platform_get_irq() function returns negative if an error occurs. zero or positive number on success. platform_get_irq() error checking for zero is not correct. Signed-off-by: Arvind Yadav --- drivers/misc/aspeed-lpc-snoop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/misc/aspeed-lpc-snoop.c b/drivers/misc/aspeed-lpc-snoop.c index cb78c98..14c3c90 100644 --- a/drivers/misc/aspeed-lpc-snoop.c +++ b/drivers/misc/aspeed-lpc-snoop.c @@ -115,8 +115,8 @@ static int aspeed_lpc_snoop_config_irq(struct aspeed_lpc_snoop *lpc_snoop, int rc; lpc_snoop->irq = platform_get_irq(pdev, 0); - if (!lpc_snoop->irq) - return -ENODEV; + if (lpc_snoop->irq < 0) + return lpc_snoop->irq; rc = devm_request_irq(dev, lpc_snoop->irq, aspeed_lpc_snoop_irq, IRQF_SHARED, -- 2.7.4 From 1584303885493434236@xxx Fri Nov 17 09:12:04 +0000 2017 X-GM-THRID: 1584303885493434236 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread