Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4565472pxj; Wed, 12 May 2021 08:18:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2XdL1WNwLx5uvMMOVzFyWcv1LDRsz9KOtu5ccJvt6ugXnCmUH0Lxr1UWJFOL24AUNVlyT X-Received: by 2002:aca:4f4a:: with SMTP id d71mr7897859oib.128.1620832703083; Wed, 12 May 2021 08:18:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620832703; cv=none; d=google.com; s=arc-20160816; b=Jmhr4XIL2pVpXRKtRNgFwm1fX5Mr12jNf98Hu/eg8tjS8fEunNuuWWfC0VzbeXYhkj x9pxMl0fgYdb4mSEpb/vnuLrZ/g9B4M7odYg8ButGFf6czxcUWzeIJrq+4wf2KNT+VwL xcJpUe20j082PuHlgZtKMWYEK0TpHwbuHCoFiHFTLTW0fv1hY+4Ejy17aSV81iaQjtpm UPhLfq9ZpVJSTcHTJYJ/y1BwdBPts4eb0JxygaHKl6bktUthb6wG7RjS8ZhTTNM4ldUT l/G16klejg4CMn37GK2F+Qhl/a56cnQCDCR0HoME+oEqD+3ee2XUzGyYAzlLCFFWzVQK k5Wg== 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=tk1q4EwZClZ4tcfSGOTtGV7dLgHL1p0Zs+XNnltrvwCM0QfOaoOd8ap/x1/pZ4N+B6 HArWoRukPzzWWmIVgxOcQk9w48Vq8k6eLClu0BMNi4Kt1ma7ctBu5CZ5oIKJLijKrlZi qQBDGtuKzezutkm27XgrT+k/iNRGL4ucl8mH6+K3+fUIBOgr7rCbuM7R6lXGwcSzKT4o JdddxdRqONVmb84orVHIDi/y+Xv2XV2eLONTGsLkCIFABnqCcFyRYYfsAMrlwlLmx0oK pot+DHivxe4u/+1wXdBR3qzot70YW++y8JWVUtKrkCdHCkEdbNxTe2mPv0K1quw89hxh CNxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HnYOC7Lk; 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 d20si147789otf.17.2021.05.12.08.18.08; Wed, 12 May 2021 08:18:23 -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=HnYOC7Lk; 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 S234143AbhELPQJ (ORCPT + 99 others); Wed, 12 May 2021 11:16:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:59144 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232738AbhELPG1 (ORCPT ); Wed, 12 May 2021 11:06:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 67C7F6195F; Wed, 12 May 2021 15:01:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620831667; bh=2BCJQ+VUR7iOEqZ1PQf3CXIRJpkqowem3R3r7vfhMas=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HnYOC7LkbYR02zDM7DB1FD1CUG5+s7AMcoJrMjgATCfAH//4SkZU9sKu2XsarrwPj g6lCqwj5gIln6SjolwSSnoDGHxR9R4dAIn2AmA4zNTbNMl82mzSDjd2XZFiNE8XcI9 3LU67Mm9fqmp8kQcRMK6+KYeu25Rr8LUBulBLBCk= 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.4 212/244] i2c: sh7760: fix IRQ error path Date: Wed, 12 May 2021 16:49:43 +0200 Message-Id: <20210512144749.776262561@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144743.039977287@linuxfoundation.org> References: <20210512144743.039977287@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