Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp64795pxj; Thu, 20 May 2021 04:41:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHxJgTnLNWjJ+x0K6e9BgtaaNuQ0C2OeBT9U8Z+/OsQlpEgGvJ9RKhnU0NXWziA7Qwrf35 X-Received: by 2002:a05:6402:27cf:: with SMTP id c15mr4518642ede.130.1621510864086; Thu, 20 May 2021 04:41:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621510864; cv=none; d=google.com; s=arc-20160816; b=rwz6a0/QuC1+ZmB+TJRWo6clPaw23lmTLQtGs2YDvnJWJK6xXWOaKwxePxjgYzHuSI YBWS/o+KZHpWjdT1iCAplyyZJgRkLJk//ex/ilos1lkVezkoEgl3C27Rb4uG6MM6x0iW bn8tx4mo2pqEWtti4+JVY8DtyISnxmifQ2Z3ltxBIgNmDP1CaCg0AJmhkl0qvOwc8Gmy eSpnRwtnq/+XeyNLSLJ9ld0Wx1ynNcEYTjh3yUdqX00InhAlmmw6dwcLhzg8Sk2ZKSdv InB+mZH+9rhbiM2P0qRjppaZsGhQxUAx9M4AxhFQ1hacUE7Po86wH8Fdsj1sHVi6BSSP RVaA== 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=XOnwAZB32hYFUOcpkNMczrMNuFtHJNYGrc7EAkRgsLA=; b=pfvF0obsneYTzwSV3PQwy4TVgOQkC5tftDPxDhPsVw+QdCjSRZ8h/Bbd+ppdrAKLNT LplO768gsH8MtvPmReXJiJd75g0aNSHYd55HPOZXVPpSELCawQr9AVNL6t065LIjZlN5 /fon851J00VRszba7mlkqMdMA+ETI97EBhBApcsj4vwUFCP1ZmfJJIjI/Ln9docRtB6I 7X+llIMUZuUbuPCOZGDt1TctGoKcTSrQlK9fqFDISXPVGSDBQ5zajzzV4XeovZmonpAp ouKcW4FVgMfk/8FodzT6kIohZz/KvPH1GXuSmOTaCf0JuF60kLvTon4uJkYIf+Chz3TU Gi6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DcQD1FfI; 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 g8si2151327edb.70.2021.05.20.04.40.40; Thu, 20 May 2021 04:41: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=DcQD1FfI; 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 S240640AbhETLjK (ORCPT + 99 others); Thu, 20 May 2021 07:39:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:37898 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240646AbhETLTF (ORCPT ); Thu, 20 May 2021 07:19:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D2FCE61D74; Thu, 20 May 2021 10:10:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621505415; bh=KKdEGtLbQVimoWNf7Isk0LvVHXtIZBLsNRi3emaY43E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DcQD1FfIVoj07pLwmAviiWxETe/QKWpKyiU8aU89VT/ik/NmRnnJUOBRPce5OKFp9 SO2pDplQCLTpxPJihGtOCUlGyv8xUlco4GXSnUATvWtThSe7x75y0AB4TyZBiSMKtX aHA9oGEuYZ+YfRO661uSSkAxUlZHEtccr4ptl8AE= 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.4 125/190] i2c: sh7760: fix IRQ error path Date: Thu, 20 May 2021 11:23:09 +0200 Message-Id: <20210520092106.341839895@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092102.149300807@linuxfoundation.org> References: <20210520092102.149300807@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 70e4437060d5..c836c53caa3f 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