Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp884704pxb; Wed, 3 Mar 2021 19:41:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJyBe0H7l10068Dw2RP/YkmcxpGnUOn6rjpOmevIuSSzkSiaSvhj/DfkfwQfV+8EjhaKwz/h X-Received: by 2002:a17:907:4cf:: with SMTP id vz15mr1952671ejb.113.1614829273261; Wed, 03 Mar 2021 19:41:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614829273; cv=none; d=google.com; s=arc-20160816; b=B2jJSli0YsFGUmsdpnB5OVj/3HX8+4LM9yekq3cJxVBHt9tsuk53ep/ANDePPNIMZE pbOmTHGdOapuZlhaC6zUy7qT1aCnwqtKbiRMU4fY6145ZDOy6bZ44FBi2Hhu0SFL1/Ia izXjkzVEgq1jwXAmDo4jc9R5IvDp7CEpFJqaX8qsqFEeXdxbomw1bJ4a/JB4XOwIpy8m EuKDM1I/REepyDiEx1vfXY067dvnIGMvQoELrwf4I6V+2beci91CP/P9WfOqRLHdcdbU U0rCldYppCS79xmD8bpnVmw844G/0ImGYm0BUrdRUgqa4IDe2t8wQL+Qf096mHH2TDA8 Q3hA== 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=mJ/KJ/DzKSlI7j/RBmm1B0oveJxtIn11fYpy5GKqhOs=; b=zQXD2d1V7BccYeSHgQ5QoSbdNUReY4Rf1z//87Ah+uI7mfJfWFqL0FfVIHb2VHZPWh 42dybXXKBi7ei4ch3u66nOnmJrH3hrtzhkaChWlZCM5oGRbF+5WqDZonnjzInen+oK+n r7EDpY5qkwasAhgEzDJ1II8hH+/elKLhJFi32ZEiLU8jxpzI9fMv5MXU7D95oFaUdNg/ 1h7skV5rE+KcRfmz5fRcJWpt86o3SAFij3Vol3rs7bv1fHVD98qNJM667UylgbQ6bE6Q cMLfJHuaGu+BcHZtjUy2u6jbvUVyO/bLNMIE6516ybWGfFPP1C1m9B5Iw2yOhgAo+uKg a3Vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zXdhARPm; 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 o22si17536269edr.539.2021.03.03.19.40.50; Wed, 03 Mar 2021 19:41:13 -0800 (PST) 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=zXdhARPm; 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 S1379583AbhCBB3m (ORCPT + 99 others); Mon, 1 Mar 2021 20:29:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:43882 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241341AbhCATRl (ORCPT ); Mon, 1 Mar 2021 14:17:41 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id C673B651CC; Mon, 1 Mar 2021 17:17:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614619039; bh=6SS7QfvSohixE/vYd+rfNUFfqM2T6pEu0bvCKQVBOgo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zXdhARPmEVNwrBLHet4xaPtu4BUXmY8T/C3w33AAdCqNNY3awIj/ZjALXLPXI5k2k INfPnTn40RinPRioQZM4v96NQ033hB/atgiimsJ8GvM40YS+dwPPsLaautvBLJfsEl x77RZTElxZdvKzFp6HOcMg/ylNG3Yw0njuB8n7jc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pan Bian , Tudor Ambarus , Mark Brown , Sasha Levin Subject: [PATCH 5.10 310/663] spi: atmel: Put allocated master before return Date: Mon, 1 Mar 2021 17:09:18 +0100 Message-Id: <20210301161157.179947968@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161141.760350206@linuxfoundation.org> References: <20210301161141.760350206@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: Pan Bian [ Upstream commit 21ea2743f015dbacec1831bdc8afc848db9c2b8c ] The allocated master is not released. Goto error handling label rather than directly return. Fixes: 5e9af37e46bc ("spi: atmel: introduce probe deferring") Signed-off-by: Pan Bian Fixes: 5e9af37e46bc ("spi: atmel: introduce probe deferring") Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20210120050025.25426-1-bianpan2016@163.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/spi/spi-atmel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c index 0e5e64a80848d..1db43cbead575 100644 --- a/drivers/spi/spi-atmel.c +++ b/drivers/spi/spi-atmel.c @@ -1590,7 +1590,7 @@ static int atmel_spi_probe(struct platform_device *pdev) if (ret == 0) { as->use_dma = true; } else if (ret == -EPROBE_DEFER) { - return ret; + goto out_unmap_regs; } } else if (as->caps.has_pdc_support) { as->use_pdc = true; -- 2.27.0