Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp45485imu; Thu, 8 Nov 2018 14:29:33 -0800 (PST) X-Google-Smtp-Source: AJdET5cYs6Ukzdlc/CUzkuPyX5kLaLwPNG963z79swUjT2IPh2P9O8/VgeXetKySfBN7HQtp0U95 X-Received: by 2002:a63:111c:: with SMTP id g28mr5266248pgl.85.1541716173831; Thu, 08 Nov 2018 14:29:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541716173; cv=none; d=google.com; s=arc-20160816; b=sF5NHV2jg8ctk0gQgCeI5H6TAMd7oNqpXlEd3vjeOW2eSY1ql3gwybROxfEKOpISng KBCTGZmi1tnaeCiz1DwmRwBYwJkXhAq7/vbE6hR/SlwBRhOuK8AHpN2W9x7TPyjNmoeD KQTdSrvTBBZY4GpX1woUB8XlWl1mmolhvPicd4mV7b+BJSWzSWD8uHXm51mHzKqJe5kR 0CbaDEDvy7HnVu6O/xktCgi8v4Ozd5oc7p99IzeAhTTpbjF98EUBwb6JbsC4cMwgec43 M5CII9OCy8P6n4Npy5id7CWBnToqEQjrWW3ZGEDYsCECZS1X3ldz65NvpanxHGakmo9D dadw== 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=1qqyBwqnUgbKZDT4kbzfANoIWmVMXXRQQbtsPYajfN8=; b=xV+5KO1QOjVYgshTL/EgrkunBtxzVi3oksieY2n0xSv5WV7Zyb9nkfv2vgkhA/lNML nhRdV8vlA6LdxBPfp3b3oTKiIzCtCJWKBBnnIrXrUhDd+r5M38a12eymMTqGpWpMgwUY aZvkQpDNhCB1TXTOiMO8bLt+SU7mRam5te5L4w/XfckF/Tk9IvSPqby9BRSrEa+WCZIk YxvPZXyQTiIIEZTaGAZwxioR74S5hHUrvC0BiJWagPwzYKeewCzNtxDpv9AUKvHPgOzE du14TxPZQi+VsvCu6bHWBWAdJw3ANidC4jHcZwvXWc5MEJ9gxWRG+w90pGiuGASz2hjp QcRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=r7nOTdPJ; 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 w32si5022273pga.337.2018.11.08.14.29.18; Thu, 08 Nov 2018 14:29:33 -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=r7nOTdPJ; 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 S1729623AbeKIIGg (ORCPT + 99 others); Fri, 9 Nov 2018 03:06:36 -0500 Received: from mail.kernel.org ([198.145.29.99]:58112 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729550AbeKIHij (ORCPT ); Fri, 9 Nov 2018 02:38:39 -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 827042147D; Thu, 8 Nov 2018 22:01:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541714470; bh=tTXxsua6lbTzqyWANVp/yIqb2tG8b3SrAFoJ4H6q95M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r7nOTdPJzQmfW2CcC3nNkZtFGrkuSSmwGYsDWJ8nUnCjvcbuq/7z4oO6Uc5G6ry8v fsZ8XUsFrxzdF9pEOhrlm9gmh1Qp3+Iuneebjq9ply+0nC++Qcf0rCi0FbujoGnFLZ j1sAhh9c80Lcm1/h76DtoGfK4UQFTKBZOvbUHTFs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Gustavo A. R. Silva" , Mark Brown , Sasha Levin Subject: [PATCH 4.4 077/114] ASoC: spear: fix error return code in spdif_in_probe() Date: Thu, 8 Nov 2018 13:51:32 -0800 Message-Id: <20181108215107.938021386@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 27d30400c448264c1ac9434cb836de0c230af213 ] platform_get_irq() returns an error code, but the spdif_in 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 error message and propagate the return value of platform_get_irq on failure. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/spear/spdif_in.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sound/soc/spear/spdif_in.c b/sound/soc/spear/spdif_in.c index 977a078eb92f..7f32527fc3c8 100644 --- a/sound/soc/spear/spdif_in.c +++ b/sound/soc/spear/spdif_in.c @@ -223,8 +223,10 @@ static int spdif_in_probe(struct platform_device *pdev) host->io_base = io_base; host->irq = platform_get_irq(pdev, 0); - if (host->irq < 0) - return -EINVAL; + if (host->irq < 0) { + dev_warn(&pdev->dev, "failed to get IRQ: %d\n", host->irq); + return host->irq; + } host->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(host->clk)) -- 2.17.1