Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3546800pxb; Mon, 1 Mar 2021 12:58:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJyroPRzSrLWeDjX/70YwO4QG3JvEdFSKjKmEFm9kQ42o6T5C05Iyb7MZuhVdtsujIJ8f1NW X-Received: by 2002:a17:906:23e9:: with SMTP id j9mr8787205ejg.78.1614632333355; Mon, 01 Mar 2021 12:58:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614632333; cv=none; d=google.com; s=arc-20160816; b=DzmC0TEEYCtfX0yheM/iqZeY1xZblfqQ7deZekcL96uRcJ2iQ4lQtNe7RHOnpE6kU6 G9P+/xKMShOERbAkXRHahiM3G2Nq41tVobACFZHE2o0PEWj8Vrox/Zz4HeEUdLiMOvC9 bQrDbLxujWoAPD0Tkk2As+HlsiCK9NwM0ZzTIHVsuMZI7CiOLLh+9PhWCBw0RIDBc1DE qVLZOlOqX8ZIjCKQT6IsA+Y+wBQ1Zey/qAHWBIm/5XqGZhgr8zR0n0w3TWvCjWF2ofK9 iF9pnTRns5XDKnVWoEmlk0JBw880BEi/6IKM0lhpzsS3uOhLodZO4bRDsH55fkTAoMJZ Y3nw== 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=K0SNe7RWnZHG5SqbHRytITpoEu0PaVFgPZNyN+kavaA=; b=vpbkK7PyxE4LXRFlhn7YqdHBCtTsGBg201ej7cOzcVWmTVW/p6rooBNQ2HRTnxnWyX dNqWIOPFKMZPMzqWgjshpv07bWOWZkAG2LQz9Xs8Ss+GdC9GdP4pIjUDOh3wC1MHONMn H82MMZMiUkn+Cf1/T1AyijTIC5Psa2e8cmfeeFipQSzpym3Y6fYqf5QacMAtZQIyYqiY uxU5C7DQnsa5HX4WG0GfEnEfL0+FrE/bcVpWupIKa7tUlj94QdAfiNGp6nMCvOM3Kn87 cV7h+uR6UoQ59FmAg+4+ZvcC7iWje0XoRgdMT+AM047cx66SY46RZWs76D54eiPqHrha hlRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VM0gFJXj; 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 bg8si11982031ejb.188.2021.03.01.12.58.30; Mon, 01 Mar 2021 12:58:53 -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=VM0gFJXj; 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 S240386AbhCAUzT (ORCPT + 99 others); Mon, 1 Mar 2021 15:55:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:47630 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237266AbhCARLQ (ORCPT ); Mon, 1 Mar 2021 12:11:16 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id C1D9164E12; Mon, 1 Mar 2021 16:42:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614616969; bh=q23Yn/2bnRoMhkx4BWbXvglPxQFuwP3BCt+qTP86S20=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VM0gFJXjWimUaaZGu5QV6l8I+0gCMchYMYjYLhYTRkm9R4fGwm6LnoV4aSA2Z9xta 1aLtwZb/mNz3LnHU3ccszABbadhjSFhNrvSy1nZZaf11lBDsp/wO5Jf6A+MFJKZp0K sn33E2LRH1ZM9mXVsHDZaYam6wA7rsy+/K5jQoYM= 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 4.19 127/247] spi: atmel: Put allocated master before return Date: Mon, 1 Mar 2021 17:12:27 +0100 Message-Id: <20210301161037.892043389@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161031.684018251@linuxfoundation.org> References: <20210301161031.684018251@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 5a9d7e252a77c..2254e36c7f468 100644 --- a/drivers/spi/spi-atmel.c +++ b/drivers/spi/spi-atmel.c @@ -1605,7 +1605,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