Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp40030pxb; Mon, 13 Sep 2021 12:20:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0tzYMFjmX39GblVloqZXm9lEBJq02CDqR8ute/kbrdWPJVyv7WvQLF9YV5VIWo7ej4x/n X-Received: by 2002:a92:de07:: with SMTP id x7mr7467834ilm.239.1631560840791; Mon, 13 Sep 2021 12:20:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631560840; cv=none; d=google.com; s=arc-20160816; b=LIOclyOGRNmlrTdfhy9wtKs8lWHaKqe+tybnd27Q4rKWlmlyC11JTkYxmJOkcgnNxR FEM+z5LGeEuWAGTmafdGoMDhoIwWYBw1giMRUeQ9hmkHjkTwJnHbichDzuOrd49P9k3g VHD3sLTs3vPQiY35/aAT9YeFH1aAYmcMY2BJF5najJIX3I6nKDUeot2uoSNR0F/Rv6H/ EmW7gNnA+bjHTVq7P417WDCw9h8vMi+VkxkPbmooKPLGqOOIKw9vTPkqu3kmRFZaBLPi BspjSbuQHYb92MamODNy6GxKGp65MKuXi6Vv06pZ4ApaMyXhZP1KT8TEgrpcqr0AXq9B QJRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+1weJ+ywxauxzsXYDbalEcF6jcP0sLqeCmxKQjpvHX4=; b=j48Wq/8JgiyHY0qvO0TWD2ObxqZ5HpaeHasuGQaGG4/FTeTTvoYys10kIjfwnzCWfY n1v+OKDRMlNp1xF1AB9PSPTqdxWmiPiDZxF+EtIbmzokTb4TMnE9x2rMKqNBtlnQFyL8 ip7sK7FW1rkurntSI3okR+jZD67MU/e/rbiZN3KXMRGfcpFi9MHzOKuGnWi8jiI5iHP6 BrryytOafAE3hUqM9RMnRidgEFlbqOeKXlJGX7HU+R7KttFzFE2Rl/1m0YFujEhxeJ+Z DqfF5VD5DKVOa9f1wkM9utRh+KoEbmi7XQNFY1JQ9ApwyXV8KkT7NrLdVBzpjVrwwzd7 vkzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OndcYYkY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a94si7611558jai.31.2021.09.13.12.20.28; Mon, 13 Sep 2021 12:20:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OndcYYkY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241779AbhIMNZq (ORCPT + 99 others); Mon, 13 Sep 2021 09:25:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:34844 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240963AbhIMNWQ (ORCPT ); Mon, 13 Sep 2021 09:22:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EB823610A5; Mon, 13 Sep 2021 13:20:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631539256; bh=u66ST+74zMqrnOJpxERUrz+Q3x2vENZK29aFyYLUiLA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OndcYYkYjIu/um6MfcOEF42rFrXHTpHJ04nCw09o01YC9yoihDEuC4Eo3xSDzATTX DMAanlLewnNwyMQkwaTZ5CuS83EuRFX+8VFPLEgKW+fdC7Fz5pZOWpI64qO+Ft2NLN HXzC0C2aciCd7dQMnv0P5rrViJ7Zt2DDpRzMtW0Q= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sergey Shtylyov , Wolfram Sang , Sasha Levin Subject: [PATCH 5.4 101/144] i2c: iop3xx: fix deferred probing Date: Mon, 13 Sep 2021 15:14:42 +0200 Message-Id: <20210913131051.324807234@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131047.974309396@linuxfoundation.org> References: <20210913131047.974309396@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sergey Shtylyov [ Upstream commit a1299505162ad00def3573260c2c68b9c8e8d697 ] When adding the code to handle platform_get_irq*() errors in the commit 489447380a29 ("handle errors returned by platform_get_irq*()"), the actual error code was enforced to be -ENXIO in the driver for some strange reason. This didn't matter much until the deferred probing was introduced -- which requires an actual error code to be propagated upstream from the failure site. While fixing this, also stop overriding the errors from request_irq() to -EIO (done since the pre-git era). Fixes: 489447380a29 ("[PATCH] handle errors returned by platform_get_irq*()") Signed-off-by: Sergey Shtylyov Signed-off-by: Wolfram Sang Signed-off-by: Sasha Levin --- drivers/i2c/busses/i2c-iop3xx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-iop3xx.c b/drivers/i2c/busses/i2c-iop3xx.c index 2f8b8050a223..899624721c1e 100644 --- a/drivers/i2c/busses/i2c-iop3xx.c +++ b/drivers/i2c/busses/i2c-iop3xx.c @@ -467,16 +467,14 @@ iop3xx_i2c_probe(struct platform_device *pdev) irq = platform_get_irq(pdev, 0); if (irq < 0) { - ret = -ENXIO; + ret = irq; goto unmap; } ret = request_irq(irq, iop3xx_i2c_irq_handler, 0, pdev->name, adapter_data); - if (ret) { - ret = -EIO; + if (ret) goto unmap; - } memcpy(new_adapter->name, pdev->name, strlen(pdev->name)); new_adapter->owner = THIS_MODULE; -- 2.30.2