Received: by 2002:a05:6520:4211:b029:f4:110d:56bc with SMTP id o17csp2118798lkv; Thu, 20 May 2021 03:51:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQMN8YDFjyBxOoLoMH/COKmJkqdL5LaD82GxFuN51ityEEd3RzoAdr/mF4I3Q7JqLGupzT X-Received: by 2002:aa7:d803:: with SMTP id v3mr4558090edq.150.1621507894209; Thu, 20 May 2021 03:51:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621507894; cv=none; d=google.com; s=arc-20160816; b=h7azIsg5xWJb3SeHCay5/yI65kw/RxtDzxKe2ZJBTjeZqjHVBHfq2q2AcqacqcKCee ieYQbVeMLgwwJ4oOT8oWaIBmB8x2csj2mHVLzTGsk9wrjNZ4N6GJ/AYKjKQ9Sc9cqZFc eW0USfb4HV2XkCXHh8uzB325wh3jRxVwYkQACQWHWPDMyTgCEyrFRWqRUDTuKmtoGgV3 V6m06LLVo05Sm+/MZiuG9IdBctLjKMJKjsCXZgTQmqu88azIKrXbrfu8unuLQov8Yk7W VoeFhtlrfNeQ7XQ8OahkK9vI6WLw2Zkhw+i8yNUijNulaJJbs5/+PdkjcJHX5EdABfJo YqOQ== 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=o/s8Xz1WENiCksyUTaEARVd2hvZ6V6ziorvrBVCSrQL/ciDCUXJyA86oUQVQeiHLEj aICtmGqwwCPdZh2JfJioD1Y5dLeDm86sMVNLR0t+ODgL7/4V/9sAh+Xo409hoH980eum gMHf9/UiddaqQwnVWRMmgFix3L40GzS5XwRKN9l+ALlJ9LMAN7FkwEO/BlhDiTNh0IKC VskiUyUlDBtFIinNY5RVMl/h0mrTUjs7M9ACk0EimO2r4Mhv0xgOxdJXZvOHJYR87kma K7QfhKOceX8dDSvJFnSbu87phox/+v8YhBxBonuWIqfyTGXMEOHmmSk4s0tkR4bpqpdw lgNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FNYC2BN6; 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 d26si2285499edr.567.2021.05.20.03.50.48; Thu, 20 May 2021 03:51:34 -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=FNYC2BN6; 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 S238468AbhETKtB (ORCPT + 99 others); Thu, 20 May 2021 06:49:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:60414 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237340AbhETKdg (ORCPT ); Thu, 20 May 2021 06:33:36 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BE21661C4F; Thu, 20 May 2021 09:52:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621504376; bh=2BCJQ+VUR7iOEqZ1PQf3CXIRJpkqowem3R3r7vfhMas=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FNYC2BN6j+b6qw65a/hfV3BS0bSYk3oPYNACuHsB7XB3xYa56IewJMSw1CRuoAaOa aaiJtQ6PLJ+QaW3e5eUz9AN7ZZc0CtPnyv1eE2J2e6gJQWhV9/OaHKgLJ2vuR3lV4s Ehk2Vhsid49hQryGnsURYh71U6b8EMzFuh2/jbo8= 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.14 218/323] i2c: sh7760: fix IRQ error path Date: Thu, 20 May 2021 11:21:50 +0200 Message-Id: <20210520092127.598785015@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092120.115153432@linuxfoundation.org> References: <20210520092120.115153432@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