Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp19342pxb; Mon, 13 Sep 2021 11:48:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkbxIBY9EWm0Y+Js/7kMrD2diUlxSC63MS3bndf9/W/90cq1HGbARPYV11dwU7w3NEstO3 X-Received: by 2002:a92:ca82:: with SMTP id t2mr5014007ilo.151.1631558905397; Mon, 13 Sep 2021 11:48:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631558905; cv=none; d=google.com; s=arc-20160816; b=lozJ3W8RgXbkKnBbvY81uvJmCaseu4Q035ja0pRPxjGYNG//MPz4bDJdR5FCGyHAD1 K8hzRElKAdAx1FiAe50t08RRf/N22TkHrESja1zzYjkK7MwM0x+jdiH0Yq9biic3X/yz 2MmlMAeYRwuKMdRt1Zk+tB++utfKoJm7g7gsoGSHtbTUQamVFlL4SjdtGbFNVjZPwd5y RX/i0XUcsyV6ObBWUuNmePfFNOy0xJHT2q0tGccko3afM8gOmUX16E9QNgRsfqo07cuA 0R7E5+0Cz1yAAccSRlfTapwdLlxSsjSseGQl6lnY5HIYtFP6588WngjigjsZRMQKJ9aT 0OwA== 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=iNW/sW/4Cb2psdGXrtlzJ7yBfoIyI08Y798eEZEyP3A=; b=0lPxVY6X7gRUtsDUGPvY9kxWar+kG24PSmULwuQx3gtyxqYREiMjOEqc7bALG0+jar +77qHfYWbkRj4IOMYNiJF0D37PRZh5+U63nfV4L2Dz+qT6jC/PPkDax0DujT12CLV2Ir TH2UiVzIoROEk6D72F2D0q7rYaLsg5iQhKGYk1+laZeTTzMyqNhaI8f4Am3AvkZLEotH ZjQUB9HH3YZ1aZe6TkN0LZMJmy6yEgZDS/TFi2NV67qeKHAGMl3FeF6nUkq20Qn83NDK 5px3r7ZOU8Mw+8MpEcnq4JEmGYRO40sRRdvJRnsMi7XhS3PpuT5iwv9va9XI87olt5dZ 0tHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="sw/+FhAA"; 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 d8si7306100ilr.109.2021.09.13.11.48.11; Mon, 13 Sep 2021 11:48:25 -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="sw/+FhAA"; 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 S241235AbhIMNZm (ORCPT + 99 others); Mon, 13 Sep 2021 09:25:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:37456 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240949AbhIMNW1 (ORCPT ); Mon, 13 Sep 2021 09:22:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B746F610A3; Mon, 13 Sep 2021 13:20:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631539259; bh=GTSvQJKEyb0797DUBrkvkkZ/1BJb1V2Q9eWA1hpJoGU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sw/+FhAAlc+tg5HdiFPyK46i0CG3oYZr2sqBK70eGVqH7CGHnBmvCBPfGrYQVLHDp cQ2iz25E29HolKKYp0H89rexNvPKrju6QaFFrs8QeAh3B3pf1WGdhmT3Cao3ohKM38 KyqkvVpXtm/d3SNpflTUyKDi2aKZGWpXMxijKZXQ= 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.4 102/144] i2c: s3c2410: fix IRQ check Date: Mon, 13 Sep 2021 15:14:43 +0200 Message-Id: <20210913131051.358624101@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 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 d6322698b245..e6f927c6f8af 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c @@ -1141,7 +1141,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