Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp48930imu; Thu, 8 Nov 2018 14:33:24 -0800 (PST) X-Google-Smtp-Source: AJdET5d+kHkF/smuWCk07gFYikEewCtYV3QAz0ZwiulB+eLLIKJimxr4fB4MdFNJpWLidNS2wE4l X-Received: by 2002:a62:3707:: with SMTP id e7-v6mr6410697pfa.70.1541716404376; Thu, 08 Nov 2018 14:33:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541716404; cv=none; d=google.com; s=arc-20160816; b=pk8IsIfk1po+RYSRRKT32T1arFIVK4cj7t1PjBZKiKrb90O4qypN+MnglSJas44v0L 1ZgbCa3757Mpbhi5Fv8PM6Gxa3abwSds9dzfZt3FLbrOd4XgxWcTGsfu6BQ1NmoNGUjM gKNtn8I7BJzsOrPPBXD3uMHDn8rBqr1T4QxZMPK1rZVc/zdcsmiUEwY7U3wECK/gg8ZV Ikku+PB9K/Z5ZBXQuxIVZbvRl+JOf4obGkzxrwxD8eYi8rX8j1QF056ciZcv5QKrU9lH bQaNYk+uozJ0bJugfWtULKl1zOV2k4YWWZ6a0SIhEvN6/BqytD/0kVRbbdjPjaZT4zvc iAKQ== 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=t+aw8Lm/F8ZyOGPwW41LOMPzjm30CAPO71ZfU156l00=; b=kRHCzXxZsroobiYFLo6tk9dicjcTdN5hPms3g1+U5JFoWGuGtI70N1cPSGSRVQto2Q Kgjc5DF4CF98R+TingJ34pcfpYH9gXxBOEqrJTZAbTbz5G8uijE2fWjE0uQdzBpI9CwR 9FJTzW9GI2DVDnuR3D9H/bmgRamevRAWFSS2BPe2uSDMuJ1wzoZ0uVX/JuOjH7OJOP97 L9KQLRvQzBYTR2cBLfXa/V3wgXEhoA8Pqc2GhYtKxEXXk+eE/xrqwLfL88nQp14ZrfK1 5NpBMMTWranbDy0y9VIQGa8B/ZFxb3+I7n0QapY7ut0Kz+Bdg0T36d0BNJT488WwSStO ZR2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wB6NEmlG; 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 o13-v6si4574971pgh.61.2018.11.08.14.32.50; Thu, 08 Nov 2018 14:33:24 -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=wB6NEmlG; 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 S1730365AbeKIHhj (ORCPT + 99 others); Fri, 9 Nov 2018 02:37:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:56232 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728654AbeKIHhi (ORCPT ); Fri, 9 Nov 2018 02:37:38 -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 E1C202146E; Thu, 8 Nov 2018 22:00:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541714410; bh=oj+1wSQgQHnGkACQFKblGUDmwTcXQPN8VromB72ZuI8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wB6NEmlGiG27Tn3GLHkLxpGSkTBgajtPaypRngjY9/MxOGJqwHepHmmL3r53XO1Gz z4qtzWgy4qwh2ltXLjEK46C8066FX7lfcs5R6v6S3plkjA9XwVSARSZggLVhXglESq xYf6+HdYm4l6JxLkc/98lexLOY4OGF2/Ftl/jTqk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Gustavo A. R. Silva" , Thierry Reding , Sasha Levin Subject: [PATCH 4.4 067/114] gpu: host1x: fix error return code in host1x_probe() Date: Thu, 8 Nov 2018 13:51:22 -0800 Message-Id: <20181108215107.121418023@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 7b2c63de20080c18d0de35b292ad61fc9bc8328e ] platform_get_irq() returns an error code, but the host1x driver ignores it and always returns -ENXIO. 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. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Thierry Reding Signed-off-by: Sasha Levin --- drivers/gpu/host1x/dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c index 53d3d1d45b48..ce1b10a2ae85 100644 --- a/drivers/gpu/host1x/dev.c +++ b/drivers/gpu/host1x/dev.c @@ -116,8 +116,8 @@ static int host1x_probe(struct platform_device *pdev) syncpt_irq = platform_get_irq(pdev, 0); if (syncpt_irq < 0) { - dev_err(&pdev->dev, "failed to get IRQ\n"); - return -ENXIO; + dev_err(&pdev->dev, "failed to get IRQ: %d\n", syncpt_irq); + return syncpt_irq; } host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL); -- 2.17.1