Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp22126imu; Thu, 8 Nov 2018 14:04:15 -0800 (PST) X-Google-Smtp-Source: AJdET5dJFlkVuNEb8b5DPhCsNSpbp1zdUmwkk+2UnAf4r94Ucz4IYHoDyBbui3sXhpRiFHzRQ1R7 X-Received: by 2002:a63:e70a:: with SMTP id b10-v6mr5052945pgi.363.1541714655612; Thu, 08 Nov 2018 14:04:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541714655; cv=none; d=google.com; s=arc-20160816; b=riQeNlczsYIaabruzRMRSNimYz0jvROV3tnUkdmuRh1LmRSMukZBjrNGelPp9Yik9l E02Fxx6Nn9nDkS0ra5bw1c77P2kVWENJHiSqODe6qMfEB2ZC84lBDtyZOV0TISmQUO81 zAWCsEUG7/Gsb16gkvUwzOhCUo3rLE/RZ2zUJRexCILwrAETxECytwVtz+Wm4SCchg5z EqiwSLK7yhmxt/p+slxL7WVc6zbDOMmAs7EQ7Da3n3IluvfyKrFCi2P8QEM2EvJlFezZ 7/1ykHVRFIfuO7Z8aSaarQ7kWrOAvKYSYaH6qEFyxsfxa/CwjamnoMdQtyAfYJ7AA+8W FUeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Jd8G0aTq6MP3K4J4e26uyIcNngFZ6ArL9raix1NMi5Y=; b=BtXA+0XnFjqA+eO9j3LC3kKGAFDZ41cp9hl7PaFeTlbK9VS+ISSQ8OL4kQ5xBJ8d9y 3FwDzSri41qkPThzqDRPMaJn+z0XVgRZppOzHCbwA/UyHcO0oTjgJ4DyQb4Lyv4qsSZN z3051AdK6M+/FxxUwhwTODJaRO2WHgkRS0ojGic0PsaCGp1KOkioQW46TP260anFbN9Y fgI7I7hLcxr9DvGrFPl1ZpqjQTqNN9av1FtHo2ZETz4uXl5j9azATVnj/BtCh6CHyE1a YJcW2lf8f33K+MtsPSsIfMaWnXguhMYwWRgfT6e/jZqT9oHKmCXBEQZareHDQFyXcEEQ BQCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MRz4MCNC; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j22-v6si4672345pgl.217.2018.11.08.14.03.59; Thu, 08 Nov 2018 14:04:15 -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=@kernel.org header.s=default header.b=MRz4MCNC; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730844AbeKIHil (ORCPT + 99 others); Fri, 9 Nov 2018 02:38:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:58070 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729797AbeKIHik (ORCPT ); Fri, 9 Nov 2018 02:38:40 -0500 Received: from localhost (unknown [208.72.13.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2BBCE20989; Thu, 8 Nov 2018 22:01:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541714471; bh=dILW/sbXvsEZmGe+SvkkuBt380mdKnZP80QdRcMZ+yE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MRz4MCNC8y8X40NRJk6usPfvf+vlZ78P2xG4VKpdgqKv66gitrzhS16pNP/AyvkrO 73PO6igsSjU/ZeJzbuC/d1lvcH/aLUdKbCFt/PnrtFRhP7VEm+3P0auKzkJ4zN8Srw cmqjzzdbiBsbdn/usJzQ01vESNZ51LsYgfCDfRFs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chanwoo Choi , "Gustavo A. R. Silva" , MyungJoo Ham , Sasha Levin Subject: [PATCH 4.4 078/114] PM / devfreq: tegra: fix error return code in tegra_devfreq_probe() Date: Thu, 8 Nov 2018 13:51:33 -0800 Message-Id: <20181108215108.040058182@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181108215059.051093652@linuxfoundation.org> References: <20181108215059.051093652@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 9e578b37505018622dfafc40eed7cd78ff2af221 ] platform_get_irq() returns an error code, but the tegra-devfreq driver ignores it and always returns -ENODEV. This is not correct, and prevents -EPROBE_DEFER from being propagated properly. Notice that platform_get_irq() no longer returns 0 on error: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e330b9a6bb35dc7097a4f02cb1ae7b6f96df92af Print and propagate the return value of platform_get_irq on failure. Reviewed-by: Chanwoo Choi Signed-off-by: Gustavo A. R. Silva Signed-off-by: MyungJoo Ham Signed-off-by: Sasha Levin --- drivers/devfreq/tegra-devfreq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/devfreq/tegra-devfreq.c b/drivers/devfreq/tegra-devfreq.c index 848b93ee930f..64a2e02b87d7 100644 --- a/drivers/devfreq/tegra-devfreq.c +++ b/drivers/devfreq/tegra-devfreq.c @@ -688,9 +688,9 @@ static int tegra_devfreq_probe(struct platform_device *pdev) } irq = platform_get_irq(pdev, 0); - if (irq <= 0) { - dev_err(&pdev->dev, "Failed to get IRQ\n"); - return -ENODEV; + if (irq < 0) { + dev_err(&pdev->dev, "Failed to get IRQ: %d\n", irq); + return irq; } platform_set_drvdata(pdev, tegra); -- 2.17.1