From patchwork Fri Aug 11 14:17:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 109878 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp975798qge; Fri, 11 Aug 2017 07:18:48 -0700 (PDT) X-Received: by 10.99.1.2 with SMTP id 2mr15733254pgb.213.1502461128270; Fri, 11 Aug 2017 07:18:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502461128; cv=none; d=google.com; s=arc-20160816; b=t5I+SG5ShFXYHo7/jq4Vnq5AJwzOPOxYQqk44RchGrLAMcpYBNyXl0osh6k/q4ytK3 PRBFic6WwNC1b8v44Kf+/euXGh23DPDSPE3XraByd/MqvK0bAQZgVcuRM3dGffIuweH7 uTPw0IyHK0UCkVWvCtpjeRtXmQKSlD49gZlj8tQ7kInWjkGY56nAVv3aC8Ct5li7jB5i tBk+UA3xvNi8qwRUtaFZ6ttJOmjeWLn9aOAkhoykcOBuNiWg8TDzaU079qBwGAmy4KNW d4+XuzZv92mzarGsm4Gl3VNJWpnLEkGO1GokFkaKcHPzdyNJK+HBk3Qy9FyTvTp9d+0g 5SoA== 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=BvllxgGg/BQVmcg0MM4vNDHCydKPOW8jJFcTFjsK5Rk=; b=nG1TGp9yAKasrDBxm1xvG2l98QlnEw9BiB0lrV15OQC32FMrE4ZTzwqQXXllvQ7nyx /IbAbjEVakGuy9uM7nzugZDNC40quARAQcfdAZZTxCgzbRSZ7R6FaycMs40sWsWmu2fq 4KjdBe6A+FKzOKXPo0nrKKPl9UV5FvkvNP9OLHHWDirKXQfva+Qo5O7pQqr4Ua7nQWSH EutdJVcoXclFiPe/Ingw2N/EwpaMbOF5sYf07WQgsMtdbKsgQSRV3yITQ/RJEujvzDYH Z4PiK6I2nxEr0vCjsE+0FNlYv8XwM9xknU6G5dmrvpOKZVJu7raahVwIO5nbcbL4WAvv UJtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OaKGpbD8; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q5si593288pfb.4.2017.08.11.07.18.47; Fri, 11 Aug 2017 07:18:48 -0700 (PDT) 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=@linaro.org header.s=google header.b=OaKGpbD8; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753053AbdHKOSp (ORCPT + 25 others); Fri, 11 Aug 2017 10:18:45 -0400 Received: from mail-wm0-f44.google.com ([74.125.82.44]:37858 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752850AbdHKOSm (ORCPT ); Fri, 11 Aug 2017 10:18:42 -0400 Received: by mail-wm0-f44.google.com with SMTP id i66so48676181wmg.0 for ; Fri, 11 Aug 2017 07:18:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BvllxgGg/BQVmcg0MM4vNDHCydKPOW8jJFcTFjsK5Rk=; b=OaKGpbD8e6GFTsXcUU7BFrqSdtIFnRy2HXUAz6CwOndhsUSMwRv2E0eP2NKGJoxBj1 Zs1kHls6c6XVvEHEOq9VFL7mNDGrzNySQKDCq/z8rOLtpu8hpXCZ2cpUf4chSvvxSIrE 2Hgmu9aq3VCv0z8ncRtH7No9wMB0JXsJrkTHI= 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=BvllxgGg/BQVmcg0MM4vNDHCydKPOW8jJFcTFjsK5Rk=; b=BocKJeMaYNTKzioudMwv3EiOnp/SiFHA104LAzNWnjsOnLq8cDP0+9qh3nv89YhgRX rJp8Prx9BycFrRSs/lMp3wymL6VPbpbFCTr8Pz9DCGpr14I02vjspc23Dy2t/3Idkhb7 6Lhzm7Z52aJpQwcdWNw+7sCY0zKlFpT9knTnwnl4QJUH2P/Sex9d0w/ktVIhlZ2+T2z3 61RDhmpcWySiusAD76LBivEQ1ghi7wopyBShoYPQscXe1+24u0K89opq3OVQ8jqf8KbS k3e2nSVg3U9x0kTaW9Ec7PwKfaZbe+KY24rcbE+zLkHdVLGAnWgJk0iuu+82aL/YCSpa MEIA== X-Gm-Message-State: AHYfb5jOjEmUgEwWb2HpWxDGG3tOoLQju+AgRSPLmuQPYu6hLF6nFZp+ JTo8Brifz6MSi4hW X-Received: by 10.28.113.221 with SMTP id d90mr11817829wmi.49.1502461121068; Fri, 11 Aug 2017 07:18:41 -0700 (PDT) Received: from localhost.localdomain ([2a01:e35:879a:6cd0:e0e8:7a5e:bd6d:f842]) by smtp.gmail.com with ESMTPSA id v22sm868383wra.70.2017.08.11.07.18.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 11 Aug 2017 07:18:40 -0700 (PDT) From: Daniel Lezcano To: tglx@linutronix.de, mingo@kernel.org Cc: dingtianhong@huawei.com, matt.redfearn@imgtec.com, dan.carpenter@oracle.com, garsilva@embeddedor.com, mka@chromium.org, linux-kernel@vger.kernel.org, Frans Klaver Subject: [PATCH 2/5] clocksource/drivers/em_sti: Fix error return codes in em_sti_probe() Date: Fri, 11 Aug 2017 16:17:38 +0200 Message-Id: <1502461061-28065-2-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1502461061-28065-1-git-send-email-daniel.lezcano@linaro.org> References: <20170811141520.GA795@mai> <1502461061-28065-1-git-send-email-daniel.lezcano@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Gustavo A. R. Silva" Propagate the return values of platform_get_irq and devm_request_irq on failure. Cc: Frans Klaver Signed-off-by: Gustavo A. R. Silva Signed-off-by: Daniel Lezcano --- drivers/clocksource/em_sti.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) -- 2.7.4 diff --git a/drivers/clocksource/em_sti.c b/drivers/clocksource/em_sti.c index bc48cbf..269db74 100644 --- a/drivers/clocksource/em_sti.c +++ b/drivers/clocksource/em_sti.c @@ -305,7 +305,7 @@ static int em_sti_probe(struct platform_device *pdev) irq = platform_get_irq(pdev, 0); if (irq < 0) { dev_err(&pdev->dev, "failed to get irq\n"); - return -EINVAL; + return irq; } /* map memory, let base point to the STI instance */ @@ -314,11 +314,12 @@ static int em_sti_probe(struct platform_device *pdev) if (IS_ERR(p->base)) return PTR_ERR(p->base); - if (devm_request_irq(&pdev->dev, irq, em_sti_interrupt, - IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING, - dev_name(&pdev->dev), p)) { + ret = devm_request_irq(&pdev->dev, irq, em_sti_interrupt, + IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING, + dev_name(&pdev->dev), p); + if (ret) { dev_err(&pdev->dev, "failed to request low IRQ\n"); - return -ENOENT; + return ret; } /* get hold of clock */