Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2319287pxb; Mon, 20 Sep 2021 18:42:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsYyeEPKl/8KQJEKxu2RB9KPM6CqfWD8FVtHgqsU217xuBD3KjnomePBnI3UW3pw0ZjNZE X-Received: by 2002:a92:c8c7:: with SMTP id c7mr20037197ilq.62.1632188538135; Mon, 20 Sep 2021 18:42:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632188538; cv=none; d=google.com; s=arc-20160816; b=nnLUFvx0m6vB60LAsrc+44z55MSQ84Jqbym7he0hzGokJK0zz1426OYsmEO+aD+hta EoM5rMnHSyEW147/CZE+RzEauOp3EwtmBvy0H/cBblcWHwURnU7Np03eb/1vXs/efI0R Cj7Y0Uw0eP4k85NFelq37fSwe/qTxgEtXttJvgfsPK1CeW3J3trFXRZhs95xrPpgBNOt s0OZT/PnfK51gXNJ40+25skwARaONRJufPLHUlXX7PzdHgC+2aQ6gxmchnFRsrDiR/c+ Y1XRDIjIdCJEVGfaaTSvHnxX3er9DKzdGItWnsj4P3Vv2VNQ/984sUoM2IHjIHDKoD6E tONQ== 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=5mHRzMAe3qVQhYfcLZk4NiWAKXwPSMiHRs5/NvEii3Q=; b=CxsL+RdViqjACy6QTZAnumeD0ftJWCcGnF8260ZVuzEVQ9PYVjv20L2sDVbHNFLQEN M8WGAdmquIK26MXQkwwM5wi/ffun87jFVP32zZQEHUbCB+F7ZcdxlDT0fxD2noD5Muiq u6YwO/celGXcOBRM/TTxf36LLhPFywljyGY9pUFbYaNjARpa8Skrsq6ce9JuBvTOECE/ NsWiMpgJSo7Txu8vAjL/Aq1YHX4Od+m/vpdUhH5EJDUjZPQxtqyGALUNILCcSHG++tUs F2FBmUKgUJv7npmorfsf6qwkuSWysSbLwnF96zRTdX963z15P3Q6bss1/T+hLAwPDdZD /h0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="tc+W+yU/"; 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 h11si14449098ior.13.2021.09.20.18.42.07; Mon, 20 Sep 2021 18:42:18 -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="tc+W+yU/"; 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 S245284AbhITQwu (ORCPT + 99 others); Mon, 20 Sep 2021 12:52:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:39012 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240599AbhITQuD (ORCPT ); Mon, 20 Sep 2021 12:50:03 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C796661268; Mon, 20 Sep 2021 16:48:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632156515; bh=6972c1G848eHgZqKT+qBBrYpLT92pCZdRSV3E6eMHMA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tc+W+yU/lIWNEwOhGGzPdFtusUqJOUgFf/9Q5xy29V8cNZMaehd0mh3w1yZqA9lCL 1S8mqXGZknByVOUS6uBwLGdoSNjCFzaqHFwj/Y2tnDeuO8isFSITpJ9Ynw5QGwO3/5 GeJT3T06DEAuRpSkWg5vn/HjXFx66l7Rcbi3iyx8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sergey Shtylyov , Qii Wang , Wolfram Sang , Sasha Levin Subject: [PATCH 4.4 063/133] i2c: mt65xx: fix IRQ check Date: Mon, 20 Sep 2021 18:42:21 +0200 Message-Id: <20210920163914.711545933@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 58fb7c643d346e2364404554f531cfa6a1a3917c ] 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: ce38815d39ea ("I2C: mediatek: Add driver for MediaTek I2C controller") Signed-off-by: Sergey Shtylyov Reviewed-by: Qii Wang Signed-off-by: Wolfram Sang Signed-off-by: Sasha Levin --- drivers/i2c/busses/i2c-mt65xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65xx.c index 9b867169142f..42a998fa5f79 100644 --- a/drivers/i2c/busses/i2c-mt65xx.c +++ b/drivers/i2c/busses/i2c-mt65xx.c @@ -639,7 +639,7 @@ static int mtk_i2c_probe(struct platform_device *pdev) return PTR_ERR(i2c->pdmabase); irq = platform_get_irq(pdev, 0); - if (irq <= 0) + if (irq < 0) return irq; init_completion(&i2c->msg_complete); -- 2.30.2