Received: by 10.223.164.202 with SMTP id h10csp115614wrb; Thu, 30 Nov 2017 07:44:45 -0800 (PST) X-Google-Smtp-Source: AGs4zMaDbvYO8VJp3KIzxHt39MoYUSDbLKYu+VL4vNx7Tsbs9y94Ahi8h7BlA4qBA/BEXWw52V6k X-Received: by 10.99.141.75 with SMTP id z72mr2714450pgd.73.1512056685841; Thu, 30 Nov 2017 07:44:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512056685; cv=none; d=google.com; s=arc-20160816; b=w+wmVzih5YeHgpV103SevVh4DtCPN1PheFTS120C59mWlAWQ/oyENYkSWfrHnNmd5Q 6t1qe0iOpar2dSQe0xlcZ1sH49SX8gq4mBq4Jx6UbGf6HXZ3pncjx7QIzkEwgtYLghtx uaEmt+Y603K34OgZiEvSGGvBAW9crjat5PeH2fC6RX64+rByrqLkJ0nWbkfnQcKTYEkq WYyY7GYvn/RSTWQai1F0grY7NUaoaYQuFFCmyKDH5UPn1NrHGCJ5cY2NnmFnIS0VkDIt xow/PbF/jH/Mw+gXodQVQ2k1X3tmJa0KLsn8JjFBZaj0sGlKdxOnBrlffOpHvlsyTdrS NpNg== 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=u3ynJGXQvttubZHaexcDCdkB6RlV0mhYgQRg7YbCDyE=; b=dbLMxEPddrGhs8qonscrl+Qxy9MKFYwxyB142+GL9ITqVdg+HUtoW5zjz1wgrAul5J 9FKLTNaDivFg2Q06ykC4ihZq140QWeA0O5xzAtioKdYcKQpXXxDZOnjUAxNdu1FIiaz7 zI16D/+rHBo3ydmBL71m12ob28W93DwvNHBv0263EC6sgnh0+RMY6HXFGgUpfqXKNDfz So4BleKGhnEKSv/D0VQW0rgpO5Ufh4/05aL27pfTtknfG2tdQSSXo1axvM1jSQWFKF7q ymXe1B1kAcWimWNEoZwZY/Ev4rduM2AecLEMDdZNKN+X3zT1NASG9A8mHWVHEIdogMdw fCGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ayUCdk1y; 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 u3si3299631plb.713.2017.11.30.07.44.31; Thu, 30 Nov 2017 07:44:45 -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=ayUCdk1y; 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 S1752825AbdK3PoE (ORCPT + 99 others); Thu, 30 Nov 2017 10:44:04 -0500 Received: from mail-pl0-f66.google.com ([209.85.160.66]:35510 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752434AbdK3Pn7 (ORCPT ); Thu, 30 Nov 2017 10:43:59 -0500 Received: by mail-pl0-f66.google.com with SMTP id b96so4461908pli.2; Thu, 30 Nov 2017 07:43:58 -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=u3ynJGXQvttubZHaexcDCdkB6RlV0mhYgQRg7YbCDyE=; b=ayUCdk1ygl7Now8NWBph0ZLD6MUzgUKV+kc8WMv1rylOV8zoBd4/la/V3hdwvubnR2 vzoe5dAAoh5FR8niJSV9zlkm79h0JB/QU5lFU7UMnQnkUWqZ4L7HKRLeUx+fNZ5UjARX K5aEIQb5erHGJZPxBNl3xtd/XwD4J6oAcM91Gz+e1irOhOodhtQq/ffQt2CIGvWk8KIh Lk7Hb4xYqLxdSMe2+CG+F8go40IHVsi13gs1y68KbMV+bDNQdDULU6y+b91mLUcDBvOQ XFAzO2hrUv9+E22QTBE5h7jD1e1qD9DDmYX9xUHt/0Z32TUNy995MjnPiOzWjS3Jn8Si j7Aw== 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=u3ynJGXQvttubZHaexcDCdkB6RlV0mhYgQRg7YbCDyE=; b=EMPhtC4CYZK/yjNyN8I3DIzbevohJ6XvFLWnAh00+/MwcnuKl9aJd0HIa08Fj0yn53 x2eqRueVZGbDCcCxnox4hENCDGQ33pigTZU85XEtx3g2P67Dk+qMomSqKsZ1RxR3kLUb tPOsfWbkgDmmrSHq1yOqbZNIUevXxlM7QYCCHqI9J8pU9+szhKX1rQJEI00VqKm60/3J aqz3DBU4/LNGkouAWLdNDtRAoeiJ13y294305Uj4VqkvfMX2vVayBFryYSjo9aAwplP2 JWE0S0m+6AEqTvN8INomb62lkb847JflB1kkx6tCAmF8ltKPG+SFu93QD9jwpLQ/Vmhu 2e0g== X-Gm-Message-State: AJaThX7bJBLOmgQXynITGyWA+k7oRE2YzxGkNn9qMmDJOhexyUKU8MFS U017zLtWkau84HozVvoxSyA= X-Received: by 10.84.131.40 with SMTP id 37mr3077220pld.302.1512056638489; Thu, 30 Nov 2017 07:43:58 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id f79sm8687440pfd.45.2017.11.30.07.43.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 30 Nov 2017 07:43:57 -0800 (PST) From: Arvind Yadav To: lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org, knaack.h@gmx.de, pmeerw@pmeerw.net, gregkh@linuxfoundation.org, samuel@sortiz.org Cc: linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, netdev@vger.kernel.org Subject: [PATCH 2/3] staging: irda: Handle return value of platform_get_irq Date: Thu, 30 Nov 2017 21:13:35 +0530 Message-Id: <1512056616-21065-3-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512056616-21065-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1512056616-21065-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 platform_get_irq() can fail here and we must check its return value. Signed-off-by: Arvind Yadav --- drivers/staging/irda/drivers/pxaficp_ir.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/staging/irda/drivers/pxaficp_ir.c b/drivers/staging/irda/drivers/pxaficp_ir.c index 1dba16b..a97ce04 100644 --- a/drivers/staging/irda/drivers/pxaficp_ir.c +++ b/drivers/staging/irda/drivers/pxaficp_ir.c @@ -960,7 +960,17 @@ static int pxa_irda_probe(struct platform_device *pdev) si->irda_base = ficp; si->stuart_base = stuart; si->uart_irq = platform_get_irq(pdev, 0); + if (si->uart_irq < 0) { + err = si->uart_irq; + goto err_mem_1; + } + si->icp_irq = platform_get_irq(pdev, 1); + if (si->icp_irq < 0) { + err = si->icp_irq; + goto err_mem_1; + } + si->sir_clk = devm_clk_get(&pdev->dev, "UARTCLK"); si->fir_clk = devm_clk_get(&pdev->dev, "FICPCLK"); -- 2.7.4 From 1585557894682608069@xxx Fri Dec 01 05:24:01 +0000 2017 X-GM-THRID: 1585557894682608069 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread