Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp1846409pxb; Mon, 13 Sep 2021 06:50:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy17hQ03G1URWchKhpEIsgNjEBU7tjhoilNWPqfbhwTa+NbIm8itQmEAH6XCSK22SgVM5Ja X-Received: by 2002:a05:6e02:1906:: with SMTP id w6mr8415824ilu.295.1631541004502; Mon, 13 Sep 2021 06:50:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631541004; cv=none; d=google.com; s=arc-20160816; b=jFAhPesde9VcEcceydLFJjxA32qzaH5k6go7LB5CSBSLFZtmLkFkfz5iPQH9nlAc9E T5jmA4sCxJY8v9CoNEmps92C/C9teOkcB6OyLXq47epedcYEM6IFPkbmfXC3TM/N1HKW iscHzs/Z91YOuDuxPlVKnoVf2DfPu/VIJesIrR9Nj24Sb1MuBUhhGqVdYIcV4rC59Fld YhoO6L1dDmNOGZ8xSLzkQW8Y1M0pac6AsUR7R2jBBE45ISeGuaVVJSdYxblSPlFIbkT4 u70sSNCkgQSTFzI4nkPNeUoL2Fwj3LZfRtXiO1+4/M+5wO+0XAZki57b7lc/nQPzE9k5 KwsA== 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=JMGoVE2M6yafV4dSP+wEErdhzgz+bRRxd/3kfxtsrBM=; b=vmbd0aBDB2XGyNPyYUs6fyqcpnYjjZdtckheWgFmNEFb5e0dbwueZB5/YHiROmRq8Y EMEBpmdOgMf0xGR5m/eXFnGfUvnOpyruEvgpyKP66QKy4GH8K85sghXU+P3hUeEER9M8 nq+CiX3/6RqataPBHwB2zGGfHDu4xdM/cHU+hqJYp/mSY7iHalJLbDSl+KR+iQjyXj8Z u0zdcJIQQEj6RpsFhng8mG8YpuDKbsaPnmPpFZv6EXmjtjuNYW+N4L2ZR/NpQx0p2NHn P1KwFfuU5yJA9mU4noQ2KxyneIJo/H2v/dn1Cwb7H4sv/8q1CpnnwpqfCsKdyYDl6yX1 4zZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="YbeuH/1U"; 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 b125si7110604jab.33.2021.09.13.06.49.48; Mon, 13 Sep 2021 06:50:04 -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="YbeuH/1U"; 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 S242653AbhIMNtC (ORCPT + 99 others); Mon, 13 Sep 2021 09:49:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:41696 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241355AbhIMNnA (ORCPT ); Mon, 13 Sep 2021 09:43:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AB6B061414; Mon, 13 Sep 2021 13:30:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631539832; bh=6jWX9ignM5vZQBV3AXjs5PVBKQL7FqEl6BRITeAkCuI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YbeuH/1UirNGdGMzvBG+FCST+D2MgyOB8OGaTuUp7g6VhJzjaFGfVR9McrpmW8k2W xqxoYcSBvLxAJ0y9DVsQUA0Y5ieDaZ5gTBqBFYj9zrgijyHhRH9gYHhOSzBicPfepP L66RybuFFd2xImi0nSU7pfPbeVeWmts5j54c6fs4= 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 5.10 179/236] i2c: hix5hd2: fix IRQ check Date: Mon, 13 Sep 2021 15:14:44 +0200 Message-Id: <20210913131106.455278615@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 f9b459c2ba5edfe247e86b45ad5dea8da542f3ea ] 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: 15ef27756b23 ("i2c: hix5hd2: add i2c controller driver") Signed-off-by: Sergey Shtylyov Signed-off-by: Wolfram Sang Signed-off-by: Sasha Levin --- drivers/i2c/busses/i2c-hix5hd2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-hix5hd2.c b/drivers/i2c/busses/i2c-hix5hd2.c index c45f226c2b85..8993534bc510 100644 --- a/drivers/i2c/busses/i2c-hix5hd2.c +++ b/drivers/i2c/busses/i2c-hix5hd2.c @@ -413,7 +413,7 @@ static int hix5hd2_i2c_probe(struct platform_device *pdev) return PTR_ERR(priv->regs); irq = platform_get_irq(pdev, 0); - if (irq <= 0) + if (irq < 0) return irq; priv->clk = devm_clk_get(&pdev->dev, NULL); -- 2.30.2