Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4634480pxj; Wed, 12 May 2021 09:42:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+mxj4L0SYvaf4vKH1TDM/EG8rUD2D6S1QXB0tK0B6qmufFj8SAXB5jW19C7o9DV+x8zum X-Received: by 2002:a2e:b4ed:: with SMTP id s13mr29821590ljm.86.1620837753308; Wed, 12 May 2021 09:42:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620837753; cv=none; d=google.com; s=arc-20160816; b=cPNhCvqWItZvG+Lr9K447+ODlmgjoCSzb47zvbT3X1kpZ6WD840Mn0nyCLVqYXpTOR U1iALSfeMxefett5dCpeO+BIs6+4nFZr1Wfz1LiMaX6OG4/lFzx+wNsp+K6V9jktBU7Q gZHJV7xVn0kgTSEh/ohgs3Xbn3WI+3BzGFig0Q3qdVmAkAJLz/iXJ94UiI/KWYPD4s5c 3Wl2DVoNNSrx8WEMq2k9agpsj62pMPUgNBluxWhXI766IYt5rv53rO44FMNvUZIxoZnI vy3G/hVplqmCdNjv7cD0+ymw/7w+hYdPDrbzDWHgopu112C5J45rNpMd00B5XnIuRHPu /vGA== 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=cxLfLTvhY7/R6/0bzXCUDfcGK81URsNk/qIEpSPopNVfE1O08OOEhTmno4TwBD43rE CccW7LUqkE6MUVLcSfqsNLE7uzulWnziBnDoNBTgn74TRfRSwN6rViDqypgcJng5FHl6 Z3jpI1lkyqUKmqpQBj5eipR2G70iIwkfMWLueJzMsJZWZEJQwfWIhiYp7rQAZyodCu3r 6mbuXh2XPZHZnDGYBvzUQK8FSLQqJMF7V1bZcWYWXSSjf+g3kwuP9M0rRXFuTdCsuXF5 5ExMCSTw7LHMpzUq0XzdOauwdhz/s4vH0SogEH66UoWYbRDrDNmii2W4dg+isMo9f0kf BnKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FPbV9NG5; 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 g6si327423ljk.4.2021.05.12.09.41.54; Wed, 12 May 2021 09:42:33 -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=FPbV9NG5; 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 S242109AbhELQbz (ORCPT + 99 others); Wed, 12 May 2021 12:31:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:55348 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236599AbhELPk6 (ORCPT ); Wed, 12 May 2021 11:40:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 43AC460FD9; Wed, 12 May 2021 15:21:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620832878; bh=2BCJQ+VUR7iOEqZ1PQf3CXIRJpkqowem3R3r7vfhMas=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FPbV9NG5aRBiAphFJI1FNnbSs91bmgOumrNpz700MY8a7MoECmeewN0cdzHZPMXzF bCNP0i7Ysm8eH/Bg/xwgZOUVHcSb7X25jLUzEtqwYZYquXJ52tWaOTrgJLs4kgP286 Y4LrsHYB10oLL3OACZrvfzjvDNHfukmeSIK8lwI0= 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 460/530] i2c: sh7760: fix IRQ error path Date: Wed, 12 May 2021 16:49:30 +0200 Message-Id: <20210512144834.876664220@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@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