Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp100600pxb; Mon, 13 Sep 2021 14:06:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwW3GbAC4MM+yH9BNXtP2Pk7Ghd5fMuzm86hy6zmBoFm4tM0E0z6fazsPGw6vTpzjEPII1P X-Received: by 2002:a05:6638:3392:: with SMTP id h18mr10178223jav.98.1631567182872; Mon, 13 Sep 2021 14:06:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631567182; cv=none; d=google.com; s=arc-20160816; b=ESy+xebMHr7X24D/KmK7d400jfRnbxPRCklFX9knx9krxPFpjF3Cebf/+ShFHmiC/q x3sTRjFYTzbfqct6oJbPwyAyyZij4Mmj7Bmm1T0XJYDXOBygJNkXKofugUqnmHG7NawU +QAWe60rhPsB9ahjKMfFl3s96NzeTmXQeHfKqKGuu8vU3hGXcwa0udwuRtQHtlqMmoYM WO2Fm9fToeEe4vlz8OSmpuwEOy60OSqzaGrOaBSOwj7s3UnRB6P9po96MwA/7snqk+Gp A7D4spi2riAZcKVSSp1nPsQIjpy/dsGdSOuQLC4PrQvy2bjm+hq6iKW5GKTK5Nvs+Pem yc6g== 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=j0sv5Ixt8It114UnVrrT30PYM6m7VfD+4p5atwAjRB/exox3rvBqhryW+Dy877iZ+x Bb7i9I7zQ4Pd28ebXygcSWfNkMrVrNX/oX5IqaxTtIJV1cFDIJbQoL02xnto89ALt/AQ naTS0D/JkLvDbGi6QmVAsKkHXcXU413lLbViJWgx4lkdgvqCCyJBH6TShzFwxyml24IY pv0JkPu/uAcadMVzyIfrCSVisnUb9coxXJx4sygKylYrtuMhZbvLK5QWqDmz1fWLsiLk CtkhF/BQubo9Ae7PvJ+CjUncgwesz+FQic8oiHEaq51+88ZAhkSoW25VpQ6PEd4tIpMc +Ggg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vBFXW+Wi; 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 y7si9049312jap.59.2021.09.13.14.06.11; Mon, 13 Sep 2021 14:06:22 -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=vBFXW+Wi; 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 S244734AbhIMNtu (ORCPT + 99 others); Mon, 13 Sep 2021 09:49:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:46738 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240470AbhIMNpe (ORCPT ); Mon, 13 Sep 2021 09:45:34 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 322B560F8F; Mon, 13 Sep 2021 13:31:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631539906; bh=u66ST+74zMqrnOJpxERUrz+Q3x2vENZK29aFyYLUiLA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vBFXW+WijwCE0RQnIssCAncu0NZ5x2kRFn/x7AkFn7lyH0HtY5NYUVNFMqNhOACEi fhcpb3dwTbGJFfGs5m6EoFYxT82OrnWPgXfXSjWGRO09G7YE55ldRqAy2PdDPcYOuG FC+G90HENXQUhCUyRAcOsT23w/Le7SzUyAotQJd0= 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.10 176/236] i2c: iop3xx: fix deferred probing Date: Mon, 13 Sep 2021 15:14:41 +0200 Message-Id: <20210913131106.357602588@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131100.316353015@linuxfoundation.org> References: <20210913131100.316353015@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