Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2319231pxb; Mon, 20 Sep 2021 18:42:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGoxP3ioqeSXVSVa+tS7IAXdZ2zZeRnV3+llDatcph5ralC7SXtfDJZ8jT9Knp9KNEqcQ2 X-Received: by 2002:a5d:851a:: with SMTP id q26mr20742811ion.163.1632188531470; Mon, 20 Sep 2021 18:42:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632188531; cv=none; d=google.com; s=arc-20160816; b=TCHJQpAcOAQFn92PZcCj+AuL5gppkpb0wftaGRbof9RlrOnD0mz7MqSDcuQnySr4vN Q5O2ac14L35O+1zw2a1l14GJd7Mf4zu3KHPAuDEYfLDwIM747CN7JKjwMugPegJJHnnD /tDeVWRg9DVRByN4hvAJIMP9USSLAQX6494JM/V7Z5dMaqt3fSkoeSvZV9EJdvibPfFl BsRQ00eKnGBnW62C8NjjcJIKASyjMaaIS/8KWP1V+yRbJsUAH+8I1eA9Igp1EYN085Z5 86pp81lWYg1KovrMC5B556sYyDfKsSOijnMUTqOBQoEzzYXHJTMBcmKLfrJTODD/LvT1 YD7Q== 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=3Nq2KGGg5mBG9wyDY/rgnrNbVKQhNzGyat/EiycrlYc=; b=z3XHOJsyoY4RHO8427aVHXuC0u+IvbFfkILQpYYcSZg3L0X3E3w49lfRLjysE44P1X vjw6861cBvecCTFNEQelmbhzXeFqn4NdGPF0V0BttqI3YGnQHIkEP7TZEvg/8FAr1FYs 5g6vADCmAB7SfOaRls5O1Ocdfe/2SP8fZDoAjtRVmTNFTvkgfsr1qfO7+xDvx+j1Z/78 ZoOaLoO3PZK5GPm3OWQPivBHargmwd+RzhsNu+t3CTFHm4VLLWoZAZU+iQGz0GkvOH+g U1076wGddYpRWdBtpYRDd2I82WrMBe9Qt3FAsztmS+qHQIQnpvPv6zir/kBnqiFYHBUv B4Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=sDUNlHi5; 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 m62si12439323ioa.15.2021.09.20.18.42.00; Mon, 20 Sep 2021 18:42:11 -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=sDUNlHi5; 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 S245145AbhITQwc (ORCPT + 99 others); Mon, 20 Sep 2021 12:52:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:36916 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243812AbhITQtm (ORCPT ); Mon, 20 Sep 2021 12:49:42 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 321786124A; Mon, 20 Sep 2021 16:48:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632156495; bh=jeL3eMfB3ypN82SKFtd5MqZnhmU8TwFGyid4okmnFOE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sDUNlHi5ChB+zqouAyGxanfmzL28rnmWJC0B/BYD3KvewUEzT9Gb7Bo+IkqPuWL+v xtmkUas/O//vlveiZztUBAAL/OSaicooVAI5WG/Dmz4+WgkxvueY65/YPO9SRkzFiY PiRusE8LFMp20Y4fRbX5WPMxGxKvQFrPU3uCoMgg= 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 4.4 058/133] i2c: iop3xx: fix deferred probing Date: Mon, 20 Sep 2021 18:42:16 +0200 Message-Id: <20210920163914.550506716@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163912.603434365@linuxfoundation.org> References: <20210920163912.603434365@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 72d6161cf77c..6b9031ccd767 100644 --- a/drivers/i2c/busses/i2c-iop3xx.c +++ b/drivers/i2c/busses/i2c-iop3xx.c @@ -459,16 +459,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