Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3344809pxv; Sun, 4 Jul 2021 16:07:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxo/Mf/CiLm16XZivTni6ZcLdeBHBUNKo1cLUjRMlc1ahYLgyN2Yi7F6DYE+fobWqusrMaI X-Received: by 2002:a92:3004:: with SMTP id x4mr8669419ile.269.1625440077683; Sun, 04 Jul 2021 16:07:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625440077; cv=none; d=google.com; s=arc-20160816; b=JaOhGVy52WLHEZzLccrPp7O4FVR3sFH3eqv0agn+E4U4eOY7IAXkrXc7sO+QogQgmm 1wPOBD07nF+k/Co9QmtjvpUiUj+7AjtbqaWxaCx1ihULDZiIU7UFZZXrKo0l8LV3YHHt INOfJOA3sIG6gB/qdn/+OjPRNSspYZc6s0SRb/cSm4PBKC0m0fieSrgwTOEf08C42vzG LaGU2gnGqjlMjaT3EiPNhVNPgbvKdGU4TV1AD7FpuReF+7nPnSnwg6gmb/AlmGNieqa7 L4Hoxw0r454bk4qrcTdPubeLBT/jaPwgN/qd1PFwE0U4k6duvJRYbDPMHK6if0Fkqncs J7Ew== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mdiY/dJLkFxvClBWr/UhHUzr3Gu3zId8NyODPqoQ+pk=; b=rT4atu0kxBYd5cPPfXh1nXEw7AW4djra+4SU4GzpXhpM+Z9ZUqpWhKMvMdPICffpbD UsdNIKiQCfOzSy33Ha+nUo6NxmPdjExhTRbNWvNyFZ/ZXvPD3oNf1uQI8JVgxYcssYKr iX8WRK4sXpBiUsU5rotDKH9bleN49L3KDhY9cz+vcBgOrmqiuzzuoOzGLdSY2Wyo99EU sRN5ERu+bCDRC1Zlrf/1mpcDJ3rZcmlc79NEji5tEjAKvRqjI8xCjgrc9Sfkx52j5zpK i6axYmp1gCTldIffCCfHOXpAD6UnAN4pDGHJhIg7yRBhouf90Evz8BSm2KQi/THFOb8C bD0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HptehRZC; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i14si11275914ila.83.2021.07.04.16.07.45; Sun, 04 Jul 2021 16:07:57 -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=@kernel.org header.s=k20201202 header.b=HptehRZC; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231433AbhGDXIr (ORCPT + 99 others); Sun, 4 Jul 2021 19:08:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:46604 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231166AbhGDXIO (ORCPT ); Sun, 4 Jul 2021 19:08:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2B13861405; Sun, 4 Jul 2021 23:05:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625439938; bh=FWdpgeLZjTV3yUDS9DmJf5529C3/nxBDlPw9YGo3gao=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HptehRZCMDsw8jzg8pFZqrJ+Uikd0ZLHeTDbIG+4MJwvRpUEpTrzi+MIwDYnOk9kC jvASibpsjVvCGmngLNghZiRXBDaDjGBur76F46ZSg1GaThdSDq/u5iXdq1NNA70TAN KZB5J77BnnI/dXIIWn9hymUz9RONnjF18uRrRnt0F0+PFMGjeZSgqTvbLHeN6/viEd BgDkqRsuKcRasbmjoS6NdLta1PQYGoiUha3WjeFv3uQeq4Eu+x128lkBp/2M3xMWNu 1ABviwADjV98akDN8gpYK2XTZFfF1raV8EEYjund1Y/5ZJkrgt+7ecUwFO7M5Yca0h yhMljqN12wJQQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: zpershuai , Neil Armstrong , Mark Brown , Sasha Levin , linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org Subject: [PATCH AUTOSEL 5.13 56/85] spi: meson-spicc: fix memory leak in meson_spicc_probe Date: Sun, 4 Jul 2021 19:03:51 -0400 Message-Id: <20210704230420.1488358-56-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210704230420.1488358-1-sashal@kernel.org> References: <20210704230420.1488358-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: zpershuai [ Upstream commit b2d501c13470409ee7613855b17e5e5ec4111e1c ] when meson_spicc_clk_init returns failed, it should goto the out_clk label. Signed-off-by: zpershuai Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/1623562156-21995-1-git-send-email-zpershuai@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/spi/spi-meson-spicc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-meson-spicc.c b/drivers/spi/spi-meson-spicc.c index 51aef2c6e966..b2c4621db34d 100644 --- a/drivers/spi/spi-meson-spicc.c +++ b/drivers/spi/spi-meson-spicc.c @@ -752,7 +752,7 @@ static int meson_spicc_probe(struct platform_device *pdev) ret = meson_spicc_clk_init(spicc); if (ret) { dev_err(&pdev->dev, "clock registration failed\n"); - goto out_master; + goto out_clk; } ret = devm_spi_register_master(&pdev->dev, master); -- 2.30.2