Received: by 10.223.164.202 with SMTP id h10csp2284031wrb; Sat, 18 Nov 2017 18:05:24 -0800 (PST) X-Google-Smtp-Source: AGs4zMa7mrebIC4sT8Fa2ncaaMHEcZonvMzPHg4tUtTTPEj+Q6gYQOmG8LeD9u5fx/mpWoo+5K37 X-Received: by 10.84.212.8 with SMTP id d8mr9466136pli.75.1511057124684; Sat, 18 Nov 2017 18:05:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511057124; cv=none; d=google.com; s=arc-20160816; b=o+QEa5jQSqv/mwNpxYhyupezZZJ3AzlOHIURR7RV1x2r23FCPvq1BbZE9tbPBC/ZrV CdQnEH2EP0y1AiMAp8Um8V1Iyh5dEOM6JDlEz8TV4wfqVeLhJW/7yAtI3cDXpzd4xrUD 2QLPe65eoB7qMfLiLOyvu34A35mr2089VwVyjQPIOmh568xLJpgGf/ThFmJV1ITBFgc8 UWRoWBAoou717bM2vm2wM5sWyy8PfsV9K9LQdKWerol2B6PNwwdsj0zHOE25mFNxB2X2 RHovATvWCHHg5XUkhZH47/f7VT7H+6k7aGU72DPgCDf6iot5LFL4TOcFUA+BHGHt/aV+ re5w== 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=s8f041I08Qqaw0bqcF1MjFQLvDxlqXgN25LYrFGT8RE=; b=NzoeYsm2+m26C0VJ9Mz7ojQRBy17JYpBQjnGDZ72CJ1b1xIAKxqAfauyuIAKg+YDVD TZVG7sXg84MB1PuOnHNK5RNky2U9PlrVJQgwF6k8x/h996Sq6Wa8d/PO1c50bInSls/I ZdZog/l55KaBcekzQS66hnUQEplxHiG2gMKtBR+pLeiiGzxAdYECihPhrTUMly75YHBU 5eN5MX9iALdiFrbD4Is4YekEFVgLCC6Qf/MC/1uAL8rtAfCRFLy2bGgoqbGJbswFzsZF o+oI3PTL5udx9WboLasOb9+FHjODbajzJ7OoB5F2uqbTSN4V3NbLpHQyTwPmvtRqfl3L CFwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=s6tTIAfR; 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.05.11; Sat, 18 Nov 2017 18:05:24 -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=s6tTIAfR; 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 S1764216AbdKRFox (ORCPT + 93 others); Sat, 18 Nov 2017 00:44:53 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:42390 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1764166AbdKRFon (ORCPT ); Sat, 18 Nov 2017 00:44:43 -0500 Received: by mail-pf0-f195.google.com with SMTP id m88so3473257pfi.9 for ; Fri, 17 Nov 2017 21:44:43 -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=s8f041I08Qqaw0bqcF1MjFQLvDxlqXgN25LYrFGT8RE=; b=s6tTIAfRviL6rrKeqQclbXQbI3pJsdCkdyE8z8UPIsCvzzbOyO9TXdwjFpUt9L4EV1 O6F3P1NA8FbxsBWuGGqEYp41CyiY8vajtdVac+q7O/1Rari8mx4cqw+tCSxWdF6y3bau 01Z1C6wRyry5RG5ZSKkoZrcjH0PBL4eCZOq/HTbCZRrBmKi/GXo5CC9m4oGNs5l9Q7RH 44Tn4haVUl9j8HdEuhsi0pIDdkU4lmUHBvTJ/GZikXTy/OJZiM9or28dPG7w7n6J/kl0 vWfa8bWMModIl8vO6hiDIKRV2UfIkNo05Jc6mW7u/aTbbFeZ0rETN2fVDnQlqEyCyA1k sC4A== 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=s8f041I08Qqaw0bqcF1MjFQLvDxlqXgN25LYrFGT8RE=; b=SP17+y6M9zIospVGKQAYTKxZyNhrPzjSrGTIJ0RjGYurF4bADOj5Jn0xEflx2JBIaJ VAR/xyYj+p0mFzZOXwz8636qsem/0U+2Wfte95JMYbqOvRNPgVwSYG6lV2asz/ypawA4 mzlNIIGOUxsL/nRkgjQrNaYgj8OyrhG3FpApmb2fFORATjPB8wABh5eD4akAC8chBv79 ukzobJhMxTPZ1wKrD7ueC+GRxiS6O+SY0gBK/ltV0Ave82n60X7PqOpwvL3wu9a3KQX2 iB16fr4V3/wr2ymoElneUxWBPgYmjXMRxwqllZyUIEDRDEjVkwmQP7LCejQG4UGrZFbW HopA== X-Gm-Message-State: AJaThX7FUy7Y/iJF7qCJAiZAalhaHWOsinCvut8CeMz88Ow/OjjqCc1Q tgIjS6RpujydEd7BtIr1Wps= X-Received: by 10.84.143.162 with SMTP id 31mr7427868plz.254.1510983882883; Fri, 17 Nov 2017 21:44:42 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id h1sm8923492pgf.37.2017.11.17.21.44.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Nov 2017 21:44:42 -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 2/2] misc: atmel-ssc: Fix platform_get_irq's error checking Date: Sat, 18 Nov 2017 11:14:27 +0530 Message-Id: <1510983867-2344-3-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/atmel-ssc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c index b2a0340..9d9eeae 100644 --- a/drivers/misc/atmel-ssc.c +++ b/drivers/misc/atmel-ssc.c @@ -235,9 +235,9 @@ static int ssc_probe(struct platform_device *pdev) clk_disable_unprepare(ssc->clk); ssc->irq = platform_get_irq(pdev, 0); - if (!ssc->irq) { + if (ssc->irq < 0) { dev_dbg(&pdev->dev, "could not get irq\n"); - return -ENXIO; + return ssc->irq; } spin_lock(&user_lock); -- 2.7.4 From 1584570292869608571@xxx Mon Nov 20 07:46:30 +0000 2017 X-GM-THRID: 1584462759571975968 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread