Message ID | 1510983867-2344-3-git-send-email-arvind.yadav.cs@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EFC1260230 for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 18 Nov 2017 05:45:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E22812ADA0 for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 18 Nov 2017 05:45:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D595B2AECA; Sat, 18 Nov 2017 05:45:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D4E962ADA0 for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 18 Nov 2017 05:45:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=mJyGzmr3+qn6DZx218n2gY4uvaD8boa7vq3mWchl7U4=; b=TGTu39c8ECjAwp0PWrTTL+bzW7 1704ZnmzQuFomqLkOiLIoa4gqnHiSOQXiiQvJNFu35Th8sapUG9NsJOFZyZcJ4VjUcmMOd98vNq8h 7vptzOGdgu/+O66CzM+/rNsw51JvTwe7A09+CnHTroXBwKhVr6vNw8Ld+wsZbYuBx1xkaQ/RT/orS 6NChRMjnRF9oQuv8gLJeRFEwvMgoTCntaU0FxxqYSFjJl92aBcJPqNmjsLEdZyPRFbR2Ho9eXQ9sB dHH9X+bThl5Pem71M/2OB8+V17ETSu4wuajHgO6+2EC5U31gOT7e+BFtUoc+MRP5kf3GI1hPzA4f1 RTYIKlUQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eFvwn-00051n-R2; Sat, 18 Nov 2017 05:45:45 +0000 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eFvw7-00033P-E3 for linux-arm-kernel@lists.infradead.org; Sat, 18 Nov 2017 05:45:07 +0000 Received: by mail-pf0-x244.google.com with SMTP id n89so3469417pfk.11 for <linux-arm-kernel@lists.infradead.org>; 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=i1qnja9rR6YuT0NgY/jO1W3BORk54NvhyDnOwQEQ31WSwMAi8FVHR6GYROWvZGMeeO +UcfFLONqir1j6JaesQ7P5ETe9DPmtBsst2mBAkpTjGrsYY4yGuXCnlrQTIceniUGEHy rVW2aqUhHLqnY7O/oW2bxU88EEq2ZEtO4iahwAoL98b4FUf/vxqdopvvjicqLOFxE9ay 1FKymrgbcdfJfpSxeKCLOuM9tTcM7G2PwYd9e6rE1FfAGo/j+Aac1xmCD+hQiDTlOJb/ UDnIAQSOVjhfxbu+V7WMZDpsGGj/JAxDiMKKm5AOLwTjUszAMEDnbgK9cFWIKGqYTe/h KbBg== X-Gm-Message-State: AJaThX48GuJeoEH8+fxHdPdzTyGRQGysBcwwtTeNvuzLaSVk6XZ+PtOD 4nQyj0obWZBbP9iRjRIp8DQ= X-Google-Smtp-Source: AGs4zMa9x7IX7PrKiWDesYlZ982al4KpMmeQkD2kyFxLUJugx6rRCDP3mxcWRUE9EpijS34MRKy01Q== 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 <arvind.yadav.cs@gmail.com> To: arnd@arndb.de, gregkh@linuxfoundation.org, joel@jms.id.au, nicolas.ferre@microchip.com, alexandre.belloni@free-electrons.com 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171117_214503_842971_ED0F53DB X-CRM114-Status: GOOD ( 11.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
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);
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 <arvind.yadav.cs@gmail.com> --- drivers/misc/atmel-ssc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)