Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp317531pxj; Thu, 20 May 2021 10:00:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynGu70uSRLIjh/yy64RX99B02+sm0fyOpKcqSfB4iqHcHus3P9YRqxyuuflph7srC0t9Qq X-Received: by 2002:a05:6e02:2188:: with SMTP id j8mr6619993ila.194.1621530045036; Thu, 20 May 2021 10:00:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621530045; cv=none; d=google.com; s=arc-20160816; b=OTw16zf3R2rZsiDn3yoQUu51rKJH99VzfVmRVb+/Qnq7XRg8O9zGJhJ8e+7/bdKSPM JcJl8l/Nk/wYNmxCvPgYGhMA1vqScxNAA+iHy5MZz7E+tOpVwwub1DXMATvbdsM44bw5 RIS9Ru23m7fbISp8iYScki6hkrOzjmBH8iqTfLbaMStyi7EwsB3ihl9Drm4CfKPPGCt4 Z+ZDW/RL176sT6CYBbphYmY1K7RqG0YJyOm2tHlAbI3DYmYRCwDUMYEvxViQlxvFky2B ltwxt852N/+vcPsfRUA7PkuKfmBYwjP/rOenvoiq/lErtDKgyWYztWW99BtmbVNkBwGe L6yg== 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=XF7ICpCXS1SYBJOHkwFc+KnTz4dgQ0uoIwSqZUGwmkQ=; b=xjyZj/gnmFyo2W/Mj2Q3wOmGBamiw/dF3zsaTnNStGXNPHVQ7hiNNWSJDSDM/+n+Ol 5q+y0ucCpmZ+aWCCbWIXqtPwmINIJ4L+ECiCy4KxfgPunLh3LogtXz3eJKzpchAUl/MX 4yajk9M7HPyaE90lBesESUtW2TtBVrnv80JE8jFpU3K2cd8RqheSTXBteUMiK9YOTp7J vncz0wgzmEGiz6evE0piI8EG4y9al9+zbb9A6/vqguyMFNKrvl27j43DB6drzN4cFzHl RlY0z6QbBxWTYPAYUEGac/BdOh0uoPbMwwvaPSuhbFquyy9dxZtZzo/1Aa126cBtkDgU l+hQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=makuCZsw; 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 y9si3039755ilp.9.2021.05.20.10.00.30; Thu, 20 May 2021 10:00:45 -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=makuCZsw; 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 S231688AbhETKG7 (ORCPT + 99 others); Thu, 20 May 2021 06:06:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:60864 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234845AbhETKBP (ORCPT ); Thu, 20 May 2021 06:01:15 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5210761874; Thu, 20 May 2021 09:39:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621503559; bh=2BCJQ+VUR7iOEqZ1PQf3CXIRJpkqowem3R3r7vfhMas=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=makuCZswjBXfTXj9dx2dLSnGmusD9ovgrNdXQO4fTpPvmHm0Gxa5z/JP1nbvtPyNd fnY11kZ9huO4WYlzffY6wr+999ENehdIG/P/SOdb9nrZ3NM37YrdcvM7Qye0ICgrtq FB6dzrmYvgDhBrrcAwCfykn424KNMS3VUDgPzxtY= 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 4.19 276/425] i2c: sh7760: fix IRQ error path Date: Thu, 20 May 2021 11:20:45 +0200 Message-Id: <20210520092140.515847502@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092131.308959589@linuxfoundation.org> References: <20210520092131.308959589@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 92dfb27240fea2776f61c5422472cb6defca7767 ] While adding the invalid IRQ check after calling platform_get_irq(), I managed to overlook that the driver has a complex error path in its probe() method, thus a simple *return* couldn't be used. Use a proper *goto* instead! Fixes: e5b2e3e74201 ("i2c: sh7760: add IRQ check") Signed-off-by: Sergey Shtylyov Signed-off-by: Wolfram Sang Signed-off-by: Sasha Levin --- drivers/i2c/busses/i2c-sh7760.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-sh7760.c b/drivers/i2c/busses/i2c-sh7760.c index c79c9f542c5a..319d1fa617c8 100644 --- a/drivers/i2c/busses/i2c-sh7760.c +++ b/drivers/i2c/busses/i2c-sh7760.c @@ -473,7 +473,7 @@ static int sh7760_i2c_probe(struct platform_device *pdev) ret = platform_get_irq(pdev, 0); if (ret < 0) - return ret; + goto out3; id->irq = ret; id->adap.nr = pdev->id; -- 2.30.2