Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2319635pxb; Mon, 20 Sep 2021 18:42:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyhRvobR1d42j7yO6/AcOrZ7qMnhLkSHsXAYOqCX7Fy3vaqJobY08Vs7nglbWG++hSw1wei X-Received: by 2002:a02:a46:: with SMTP id 67mr21458176jaw.142.1632188576079; Mon, 20 Sep 2021 18:42:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632188576; cv=none; d=google.com; s=arc-20160816; b=h+4gwe1eDWcRIuBtV09wLuI50qxAhUBe7fGhos3kYZdjJLtxjx3QxWVeOukw3dBpV/ rp50qiP4g0JQ9qYiUvG95w1ySy+CjhLw9n0wJ7u33xgaV21OKROQoW7t7EpaOhyQj1BZ h1zL6bYDHGjhoBaD0Clk2fRwZ0fRXRpXX2sBeX+xUQA25I5jMmGW8D3k0vSNlsyIkR+v hOWZxJJVHiqIJPmTnguKvlOLefwDbWxAEDX8omBzyP0C5CBDII5eF4KVByNjWq3QsuYb UaMQJV4OGdPLxaOXO2dgu1MnlogmNqyiO6rGSv29wqlWzy9emFTH97azOJZVlSgOLBNc Vu8w== 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=FNgiUg1TKVhzvAijHY15P01baeCVEo4hzUaLCP8QGf0=; b=prg3KK7TetGFHtKLlyLECLjjeKU1v06RQ00WSGVW5HiuMfZBwoTrL/QGpAJIBw182u oj+utcidahCo0mOZ9R9K+ZnWdQ5P6ez8mYtEB7guqsNWstKK23idTob17b9NPiRGKybu bpmFMigz6rJWuAVattg6ZNwLXvvEGb9fhlC4RPJjHkmM/y2CFwiz4EHT8SrSD+6MDXi5 zpJz9m1AiPUzQsIlGpPVYzHgm/krJhp6izh2rUdqEj1pGa6uVC23TtW8F+/jL72stCOD BcQID1P9WGvg74Ri2C8j1Vv9rvKJFHG675lRV2vkF61jxkwliIr0MfL7k8/KsMX95GVB oMrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LqdE8q7I; 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 s26si15539819iov.21.2021.09.20.18.42.44; Mon, 20 Sep 2021 18:42:56 -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=LqdE8q7I; 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 S245226AbhITQwk (ORCPT + 99 others); Mon, 20 Sep 2021 12:52:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:37262 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242757AbhITQtx (ORCPT ); Mon, 20 Sep 2021 12:49:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 15426611AE; Mon, 20 Sep 2021 16:48:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632156506; bh=RIslOFZYcQb3jfkRSB4e3DOO1ULVjvFJPY4ZleFHr5I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LqdE8q7IaUyQJwwdl/SB6HIZeDhGV63N/zaYuD3kGmVBt9OPGf5CHLcL7hjKOzAbg 0TETG/P30iFaoenCvjIHQLU49yEDuwywha69FabG+MvQ0BfQsaRQe2+hMwXuguSjEz spz5b9mqro6CdLjpJv9M3mI1Xrr72nfwUwvT+hik= 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 4.4 059/133] i2c: s3c2410: fix IRQ check Date: Mon, 20 Sep 2021 18:42:17 +0200 Message-Id: <20210920163914.582441994@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 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 bea74aa3f56c..44af640496bb 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c @@ -1213,7 +1213,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