Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp70508pxb; Mon, 13 Sep 2021 13:12:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwb+BSCI4Q7jCd/wkxBMKVMSH64uBN9YXeStWeOwDq+uSXUTZb+vJj8In58tZ/H6Yhn/Mdd X-Received: by 2002:a17:906:ae9b:: with SMTP id md27mr13375444ejb.380.1631563969308; Mon, 13 Sep 2021 13:12:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631563969; cv=none; d=google.com; s=arc-20160816; b=tXRhSLTZQ8apm/0GpkgA2UjoxGx0YShE42f/8mRUYe6GMlD/r9DAmqCtCFis54zXKX 8E4HLBrgoxNKBE0KGUhbrp0W6YxKRC2H5hCleK8MAPcnuEtwXRqBAY3GtEVTugsHM5af PmqitSwsOr1Nh1LdN6+fblYw8627cssd2auKdIf+w4O2NTtUiUqpDP5THTGeRAi+IHi+ A15WVjwoxYNTDc5d/CMZdHZoKbby40my4UBLtfb7cC9mikyliaSNjKxu2jAURHZcNhIq CGN1p+O0MtxOtSfk59pxgHYQ7Ch84lEpXFTH+wz9ii+pq+cMic9fj3PwvW37mDC/WwPe lx6A== 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=C3SZCk1pq6LewpZvVs/1+Jq6oWq2L8L5fJfBYxd9wW8=; b=ThyidzikSCNsxYOz3w1pd9/gbzP5rX5oK/K9x+xYc3zxh2v2lgTE3BMk3NuBK48+dX cRsTzd26S3jwycsv9Dy9tnriTEIgxsSy7aWJPVGz0Qbh0RdSDhqqcQtIywe29SRobaYX We/53Og2mqPhh06Q3Bh6tsU5nAow+uA2V0ef08eqxlluyITyYRxsYp3twjEPo9oitD29 rrrYmwS7xPHHeD7HsmmczR8LGJbSG6lmCzcd4B/Qjp/TBHyxYZCseN4wLztmAbMVdJZf AuU54yXg7id8VljHa9WzN/lTSl2hWb5tKLlbw3fUNLsqxubChHg+NqesDlELm+Glgf/p NQ2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=stSUpMPb; 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 u62si8291091edc.130.2021.09.13.13.12.25; Mon, 13 Sep 2021 13:12:49 -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=stSUpMPb; 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 S242322AbhIMNuB (ORCPT + 99 others); Mon, 13 Sep 2021 09:50:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:46760 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241449AbhIMNpf (ORCPT ); Mon, 13 Sep 2021 09:45:35 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 72A57610A6; Mon, 13 Sep 2021 13:31:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631539908; bh=L9vxqqCEnTNZywO212O/rL6FdrK/umGTDKqzH5UVo5U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=stSUpMPbZFvlIy/iYih/T++TsNrfxPEpT4QW97cH23qAxSbl3OldJ1QiCHMEurjVG UWVzCYrywDz852RzMStYl+jtfVZvwzb3EgHP66ReRR2DdoifBX2iVLwS6mHGjP5GVT 8idh4Jau4zlVisV+ihrYh895HW0I3QtUh4MDZLXw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sergey Shtylyov , Krzysztof Kozlowski , Wolfram Sang , Sasha Levin Subject: [PATCH 5.10 177/236] i2c: s3c2410: fix IRQ check Date: Mon, 13 Sep 2021 15:14:42 +0200 Message-Id: <20210913131106.391449822@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 d6840a5e370b7ea4fde16ce2caf431bcc87f9a75 ] Iff platform_get_irq() returns 0, the driver's probe() method will return 0 early (as if the method's call was successful). Let's consider IRQ0 valid for simplicity -- devm_request_irq() can always override that decision... Fixes: e0d1ec97853f ("i2c-s3c2410: Change IRQ to be plain integer.") Signed-off-by: Sergey Shtylyov Reviewed-by: Krzysztof Kozlowski Signed-off-by: Wolfram Sang Signed-off-by: Sasha Levin --- drivers/i2c/busses/i2c-s3c2410.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index 40fa9e4af5d1..05831848b7bf 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c @@ -1140,7 +1140,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev) */ if (!(i2c->quirks & QUIRK_POLL)) { i2c->irq = ret = platform_get_irq(pdev, 0); - if (ret <= 0) { + if (ret < 0) { dev_err(&pdev->dev, "cannot find IRQ\n"); clk_unprepare(i2c->clk); return ret; -- 2.30.2