Received: by 10.223.164.202 with SMTP id h10csp894998wrb; Thu, 23 Nov 2017 07:56:34 -0800 (PST) X-Google-Smtp-Source: AGs4zMYKl2IriJGUMlvKatoLEk8jfnQhL/PnjJHs/dpqIUiOmi3aXLza+eYKJOEgyU3+G6+gVpt5 X-Received: by 10.84.128.197 with SMTP id a63mr25325940pla.212.1511452594274; Thu, 23 Nov 2017 07:56:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511452594; cv=none; d=google.com; s=arc-20160816; b=MwXsGv9FQ177Cx9niFGkdXav568efNgcfQfECsIAfyfCRACeTKPSA38t+y3bYHFKd4 KznijZfc/A3EKrNPilW8K7q78QQvDqKnMSmytYzl/GvQfsze1flMS9eb0yl7oL7/RPW2 437xH/+Pv6NAB8f/9efqg0KxZbvBCEgldTXPpON33s2bv0eDw6Sv2ymg33I52r8tbgKz VzrcHAmfQ+RHnaURSQGKMOtiheUvem+3YKfCd3IwNdon314+sWxoAxxafnLajg3Wjn5W vI2vbIgEBjWHMz1AXSLeCGAOoGHOzkNoOIoOm2Ug73szZXrbYmk9tXUE7/GgT0njnd1x T3qw== 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=oCSYrTBpReDDJLW1dlFSBAqyhrM/eDiiB5k+AomEu/I=; b=SUMgk2Q/uqUgLvlmkBDRjQyMmRAqcBnSPhZqwbDABk3ei/HaggJsr66UyiaLAD4q1p gN9/LOA6GgsZFE4FDdyNuiOOAhJ/r4/+JGEmqn3q3rnz7Lt1ZJtWrILJXjltr/AhfRDU NfYOu3huuZFx7bqYfEogbZ/0dhT+snxzuKSojg69Kv2T8+Q9miI3vVPP2f0ncZWVPue9 Wz3cWFwyWRi1enPY0alw4Irydg5EpG9rTSPDqc/LoVK74BSB8kb3wjbgArptEHeJXwjE g7CRjigcEZExs3od7tsUr2KKjKVdQ3RQE0NekG7MSNYuYwPRkwrwQ82hG9SCKs/4rVAN LLag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=m46sNhHR; 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 w4si16081597pgq.501.2017.11.23.07.56.22; Thu, 23 Nov 2017 07:56:34 -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=m46sNhHR; 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 S1753011AbdKWPzs (ORCPT + 76 others); Thu, 23 Nov 2017 10:55:48 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:32771 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752413AbdKWPzm (ORCPT ); Thu, 23 Nov 2017 10:55:42 -0500 Received: by mail-pf0-f194.google.com with SMTP id a84so13681089pfl.0 for ; Thu, 23 Nov 2017 07:55:42 -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=oCSYrTBpReDDJLW1dlFSBAqyhrM/eDiiB5k+AomEu/I=; b=m46sNhHRSYYI7X7cBQeQ40RWUtS3Pft7pd1ryt1Ea2exTCQ4MalozIq6RD5xmkA9to gt2nQI82xJdI/NUUW6B88xrDg4ozqoABAvJQoqUYHOo0YdAgbyAy+rvpdGAwA/bkfsi5 /Y1yGuStzSEtQlJgYsamsPmHg4sbaP0kt7rU0QsxjDHlLdgZPooNTUceT4XP9GPyc646 XzgQqJXP8njcFqwhm0edSU7/6+wHG7lXsYKV4Tf4PHHloN2y0bg2KdDGOHtnrN/+heiD UvQhMgmhLyPNhdWmx8fi02Xpp0bJ26sBD7FGxiVPWJmyMcaazloVOftJmLvnJVw0Z2s7 dJFw== 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=oCSYrTBpReDDJLW1dlFSBAqyhrM/eDiiB5k+AomEu/I=; b=PID+ZpInrdSEX2q4cy11ZR2FXyNQvO1fkfJMd9+hlQb+6+/HfolF2mAbIijti6+fu9 zWgRZRwF2Cjvrl3DExZgbn6Vr3ylFiurGd52U2XNBWbYTuoCCXHQMBsJLf8Ad52pL4OQ ZTzgPehiJ8RnE2VakNxwFH0NOlsgRKNPtNErW/hrNXxP8dj7vlTnkVt7rb1JbkSQmVAk EUveLo58cAkFwUzmH+ZPj4k9rqubg/ouDDMXG+mLfe5Gec5nEOfo93ibrip3HcRLfzoQ PfEKqM5btBA7BRL8mZ2IrddyIX7q2VRBhrOTpmlwCEnyTyqo7Qkn27PRxPQjp4fYSStx 6kyw== X-Gm-Message-State: AJaThX7WWG/BsApYXS2CnAyUdTWQ2tuy/t1lAGXJof5pf83B4iyfdMK3 HpmHdQZH9y0UPtrtSXRXQBk= X-Received: by 10.98.213.71 with SMTP id d68mr22010761pfg.171.1511452542463; Thu, 23 Nov 2017 07:55:42 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id a87sm35747617pfg.159.2017.11.23.07.55.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 23 Nov 2017 07:55:41 -0800 (PST) From: Arvind Yadav To: myungjoo.ham@samsung.com, cw00.choi@samsung.com, wens@csie.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH 1/2] extcon: adc-jack: Fix platform_get_irq's error checking Date: Thu, 23 Nov 2017 21:25:29 +0530 Message-Id: <1511452530-16858-2-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511452530-16858-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1511452530-16858-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/extcon/extcon-adc-jack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/extcon/extcon-adc-jack.c b/drivers/extcon/extcon-adc-jack.c index 3877d86..1802635 100644 --- a/drivers/extcon/extcon-adc-jack.c +++ b/drivers/extcon/extcon-adc-jack.c @@ -144,7 +144,7 @@ static int adc_jack_probe(struct platform_device *pdev) return err; data->irq = platform_get_irq(pdev, 0); - if (!data->irq) { + if (data->irq < 0) { dev_err(&pdev->dev, "platform_get_irq failed\n"); return -ENODEV; } -- 2.7.4 From 1585216390531830936@xxx Mon Nov 27 10:55:57 +0000 2017 X-GM-THRID: 1585216390531830936 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread