Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp19236imu; Thu, 8 Nov 2018 14:02:00 -0800 (PST) X-Google-Smtp-Source: AJdET5eHYV+N9rs3AhxNfqNjBTen9ggp3D6Aedi6Jlo1oSi/qqjW4kLvB7sCMsbQ19NYtOWoZEdV X-Received: by 2002:a63:b30f:: with SMTP id i15mr5271542pgf.240.1541714520426; Thu, 08 Nov 2018 14:02:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541714520; cv=none; d=google.com; s=arc-20160816; b=Hwd5WW9Et1RUoB8Jz93rrzuEZhkWRZCytIHKrkTg1N3BJtz/Xrqov6YO0OqYHQ2sy1 HHSIn5SRXM8s91lO7d57GGqg+2fCrJKS19W/dumdGOKLMRvYuo0Tg0m2hl4vSIx+IbtV 6Xzjk8ICUndA1xEjZo+VRHzaxntEd83HH/tRj5XALkHuFHKMlY1KU6L3lg4OXmYH3V+u vxLf3x7VngVB5xRFtZHShVhi3lYypzGeryansg5phVLa3X6zItPhSG+dFCVS/k3sJkre FlEo8bsmaLolyLs05ZiaKTYbzvvGK6kW8JV/uV09Wz7FwGD7gsJgidAIP63rJLQ6w4fL XuOw== 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=YMp3tJ3PbjBclZ1AK669DqqGVTOh/ysGmeF68qVeZrY=; b=F29+Oo7gNB8r3u247nLzso9haIeTpKmN4KT+M+n/vptAwZ6SXgZGWivi9ZkWqo7qdO ueBHIeeFw9MHf65C+ji1omVOY6iHYU5azzQGVnP4ZRKXraA2oz3Qcc7W5Nx9F8lMHIja Z/LVmqOQP4f+M0G8+HWknAwA5B8ohHMvJ/RWn+qqGYPlZUGpFQgvW7FG4LFtTraECiUq SDNwXmSFvVRWA4WC2Y78uxWoEe+VNHVsxoOLkTyhsvQ5hPWwAXS5qcQlj1O+ex7aQ0CX HHc7ORClnfY9s37DXOpEfitlj0IrmMnGm3gLchDe8dQ/4AEz5SXJgra7X7b0jabfQqKw UmwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TZGzrgRr; 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 z8si4177829pgf.577.2018.11.08.14.01.25; Thu, 08 Nov 2018 14:02:00 -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=TZGzrgRr; 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 S1730423AbeKIHhq (ORCPT + 99 others); Fri, 9 Nov 2018 02:37:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:56394 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729599AbeKIHhp (ORCPT ); Fri, 9 Nov 2018 02:37:45 -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 2A41420989; Thu, 8 Nov 2018 22:00:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541714416; bh=v4zzPLf0eCuuM2a55Nnb+FtlRe1ZtwL5hcXD2k9apXw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TZGzrgRrlhpSGv4lk7WDage4SqLVTVdTVlDRr7ZXaaBILRImq8p5NRqmOtBGqcZgi fxCWT907wtrXA674oyZO8GnjYRvOnBFYn6Hv9YAaS5z7d9IQ4Wk3qP4+SF7nKXXeMH yxkfyxWf84THn07HRLlW7o8R5yvy5JFT8qTK4dTA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Gustavo A. R. Silva" , Linus Walleij , Sasha Levin Subject: [PATCH 4.4 069/114] gpio: msic: fix error return code in platform_msic_gpio_probe() Date: Thu, 8 Nov 2018 13:51:24 -0800 Message-Id: <20181108215107.276985381@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 ca1f3ae3154ad6d08caa740c99be0d86644a4e44 ] platform_get_irq() returns an error code, but the gpio-msic driver ignores it and always returns -EINVAL. 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. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/gpio/gpio-msic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-msic.c b/drivers/gpio/gpio-msic.c index 22523aae8abe..3abf066f93d3 100644 --- a/drivers/gpio/gpio-msic.c +++ b/drivers/gpio/gpio-msic.c @@ -266,8 +266,8 @@ static int platform_msic_gpio_probe(struct platform_device *pdev) int i; if (irq < 0) { - dev_err(dev, "no IRQ line\n"); - return -EINVAL; + dev_err(dev, "no IRQ line: %d\n", irq); + return irq; } if (!pdata || !pdata->gpio_base) { -- 2.17.1