Received: by 10.223.164.202 with SMTP id h10csp2353970wrb; Sat, 18 Nov 2017 20:03:17 -0800 (PST) X-Google-Smtp-Source: AGs4zMZ+fTYORB4BZb+sdUWrww3tGF5Bykt+EkTYvPowik0kGY0rgyNcVbVylWnxHJEdtuSn27oT X-Received: by 10.84.170.132 with SMTP id j4mr5098195plb.316.1511064197036; Sat, 18 Nov 2017 20:03:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511064196; cv=none; d=google.com; s=arc-20160816; b=dNMsBOie148RrHlu2ucCVjTb4HGygRBExyvyUxxkusw/RsYpxf7Ruz5mmtmZtistZA eoi8GXvIJwokZuIzuUHaEyHe7LRU+AdOdijnLNX4xWj/109Q5QTbgzmvf1/H12NXkGgW Uh2rcvCg3S5mQOcEwRWtzAKTmc9J63dTdW1qSWVl2wagce4ixzz4kggrw2eu3uCxmmml UdyafPpGFCNsV9n240AAS1DRO74nUTnbltsPvpcoLg46iCUYTuqMz3tT5nyQSXEB6tPx CG5sn/dxxrUrcO7T6mZlDrGaL45p/B3MMd7BTtf2L/5rB2OBHK9MjPECtjJwKPgb+mEt 1HaQ== 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:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=wo2RZfTQTaIyjh71E2i9Ok3zZ4My7t8LgsQ2jP+xuDo=; b=ia+q9n1QsKG4YpZ5xvj+uczYGRQ4a8K3ZkjUdbmpUKN0C3wA/PzVfGPs3lVhX5tUqC 4xNyVYhntPaT5PFJvRUgaF179csHJqgWKkCTx7FZwadKJd2e3lVYEJDDGLfcoW+UAh9D ZER7lAW6+5tjMdnWLbQYAI/Hlt5IiO60XPXJTG2jtCdD5kIGo6nnmh5jG1VjlF0r9EZz C/pG6IwYjD0GlBYzZW73lGq5po51IRbQGBeXpTswAY2kMNa/JatGasQb+qrTStj2bnLV CuDC1wVljHnEDq3kUBx9kQp65cUHsEq8asU57aDX2XTqeraOVlgjQlaQNTiXV1oDI/om qJrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=f7o77xrC; 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 j14si5451450pga.407.2017.11.18.20.03.04; Sat, 18 Nov 2017 20:03:16 -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=f7o77xrC; 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 S1764692AbdKRK5c (ORCPT + 93 others); Sat, 18 Nov 2017 05:57:32 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:39915 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1946484AbdKRKzs (ORCPT ); Sat, 18 Nov 2017 05:55:48 -0500 Received: by mail-pf0-f195.google.com with SMTP id l24so3826143pfj.6; Sat, 18 Nov 2017 02:55:47 -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 :in-reply-to:references; bh=wo2RZfTQTaIyjh71E2i9Ok3zZ4My7t8LgsQ2jP+xuDo=; b=f7o77xrCB2l7Ko6je5L3AcjdTFFyBLB7YWBwpOmyOGWY33cDAv/JtOWaZbutWuqbzQ qgfuJp3qkkgyszC0W6J7H7xM0xctsARxFud1UliEzzD53j+pA7N1DWkBesBfeZMkhzyC eimnR2jVkGfLQNFrJQENa80BBqJuRJs50BLL/153mJ8eQ5aaK17hWUQgHdL/p5P0IN6c 3op/BIhVSXjA9KL4QDYe1OAy/sr7sLkixVD5a/Yx27bOZoh1VA+0h1k7rR4WpW8WxRZz TfetrZS6YKgBuDxUTlWMvm5NXZnyrLci8A9+vTvo6E6d0wP5eYvCqe/ayIysB3jAE6iX j52Q== 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:in-reply-to:references; bh=wo2RZfTQTaIyjh71E2i9Ok3zZ4My7t8LgsQ2jP+xuDo=; b=ta5bc/WYCKNH5vN3XdHEttpJEJDvtNil0z9MK2jTV3bCgbnFga/ok1ijo6v/0CQVdk D1do4D1Oo8Xm0LaInXvlilNnF2rTIvvSxv1FL0ISwJEvBMHJ0ILfv0QVSnSi47V1AwT3 ltJFPKxRccSZ2K8NFNuaiXZMHMqwtZXfuY0jMV1pre+dTXTLczttTA6y5FGfD/E+N9q+ bVT/dJnVLDTM1NGM7HFewJZb1pn7ogWoEz8jDmDIOebmfTkOQ2+7oxQ3E1tEzGWzierF ZPztBaeGLjzQvw+rqztCap6m4+iId/sf2g+ovj6bgdg8B2CKOtN6WtHcsueojzIis1ai Z0uQ== X-Gm-Message-State: AJaThX5kVqbKSeD2pmDvBQhRCJl9Czih3WqJGk2c/1f4vE7q4hoZzF+g n5eedk87Hp7TYRCOtUu3ZTU= X-Received: by 10.84.244.129 with SMTP id h1mr8044859pll.255.1511002547015; Sat, 18 Nov 2017 02:55:47 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id g7sm12321513pfj.13.2017.11.18.02.55.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 18 Nov 2017 02:55:46 -0800 (PST) From: Arvind Yadav To: dmitry.torokhov@gmail.com, maxime.ripard@free-electrons.com, wens@csie.org, mcuos.com@gmail.com, linux@roeck-us.net, linux@armlinux.org.uk, lee.jones@linaro.org Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 06/10 v2] Input: w90p910_ts: Handle return value of platform_get_irq Date: Sat, 18 Nov 2017 16:25:13 +0530 Message-Id: <1d35ad94214f0e0ba6cd50d443067c323121486b.1510999334.git.arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: <76d6a73ba51e1a8a86d8d9a1d0bbbf7723d5153a.1510999334.git.arvind.yadav.cs@gmail.com> References: <76d6a73ba51e1a8a86d8d9a1d0bbbf7723d5153a.1510999334.git.arvind.yadav.cs@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org platform_get_irq() can fail here and we must check its return value. Signed-off-by: Arvind Yadav --- changes in v2 : Add failure case '<= 0' instead of '< 0'. IRQ0 is not valid. drivers/input/touchscreen/w90p910_ts.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/input/touchscreen/w90p910_ts.c b/drivers/input/touchscreen/w90p910_ts.c index 638c1d7..fa74f2c 100644 --- a/drivers/input/touchscreen/w90p910_ts.c +++ b/drivers/input/touchscreen/w90p910_ts.c @@ -277,6 +277,10 @@ static int w90x900ts_probe(struct platform_device *pdev) input_set_drvdata(input_dev, w90p910_ts); w90p910_ts->irq_num = platform_get_irq(pdev, 0); + if (w90p910_ts->irq_num <= 0) { + err = w90p910_ts->irq_num; + goto fail4; + } if (request_irq(w90p910_ts->irq_num, w90p910_ts_interrupt, 0, "w90p910ts", w90p910_ts)) { err = -EBUSY; -- 2.7.4 From 1584469917664831487@xxx Sun Nov 19 05:11:05 +0000 2017 X-GM-THRID: 1584469917664831487 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread