Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9097158pxu; Mon, 28 Dec 2020 06:34:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJxP8P2SUrdjtYkXe2T6zn2tGm+crHjNl26V6Px5KvlECB0Vf1XTz2/OCjLkYUtJ6ML3M/x2 X-Received: by 2002:aa7:c4c2:: with SMTP id p2mr42654642edr.63.1609166050529; Mon, 28 Dec 2020 06:34:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609166050; cv=none; d=google.com; s=arc-20160816; b=sa1CkqqtiELZ6CglxqCqPeJ9LdV+jBhC0ssOudgSqVVEA+SQk6v+mzBiHV7MMq4n58 1nZxYgXV4m95T/VerdyT6O/nqYxzJdROzQ6bjAifJ1Ymw7qAvBXWEc7fuBM01BOPJRg3 ZQNCj/Ia1hcWBNbU+UileuvK5JwvM7WrGMFq/9pcr7OnMK9AOfPcdsY0mR4bwyMpzqmg RjdrhAja/nViFdTRrlQOqi6GKst7hPVVFvbda0dKbckZVeEFERoYCzlk5+yVib/QH97Y juxpfW0s5jNfFMRJsfJrb4Ra1beB0nZqIm4COvQcyJB5O1FNrSvv3DPijDBYGJl80A9b XaxA== 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=c/TP8D/LAxp7PENKPoxCk4Id/J/qn4AlXrICzQNSBHs=; b=vPlvr56IQ2mKsXGuvWd14892OnHXdI8SwR/yhxcWhyhiU9dlt1VOpbRYmDCGB1u7Ts m5Ye1DcXZ6M9T0arJDF2P/+lL6b4/oH8tWjJWu9esA7DVRB+7opFGbWOotNr7+2uaIe5 QWzB7/IDA56alwygcwtoFhW1YHaIQS+oslFVzGL9+lSLG/lIw4LhJJfDd/N2EoQv59dm Ak61wSCXMogttMnABFzzrAIsgVfdpIBLTpIJxDe59p9iExX1ZAKenZd1qV/fap4n4KF3 EFWzDAxvIUJyfuezX+hu41/K69aAO0C7vA/Rio68GH+OC7H+TnyT5+s3yOrt2ZdKT2jm sMlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JAA5XhKT; 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 s24si20869277ejd.135.2020.12.28.06.33.48; Mon, 28 Dec 2020 06:34:10 -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=JAA5XhKT; 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 S2503711AbgL1Oah (ORCPT + 99 others); Mon, 28 Dec 2020 09:30:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:37516 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2504035AbgL1OaW (ORCPT ); Mon, 28 Dec 2020 09:30:22 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id A75E320731; Mon, 28 Dec 2020 14:30:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609165807; bh=+hN4M+no+Ki+hCMeeLsUCeOLOTSqIYfsmJH3+f51i1s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JAA5XhKTeGwqvWUqx4Gt3aDylszmN6OSpDpOEUhyo+lH3AbB6VjL6ByZmD5ZSGjbV 4JwJ0lm1OknzIdPE0PJrL8149w3DKRu8mWCweSZTDxtD/93kKAukyZrWJSbKn9Lg7p evjawXkSQVNslWmY96RHO3aIe7lI/7fI0PZeg7dg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lukas Wunner , Tudor Ambarus , Boris Brezillon , Mark Brown Subject: [PATCH 5.10 661/717] spi: atmel-quadspi: Disable clock in probe error path Date: Mon, 28 Dec 2020 13:50:59 +0100 Message-Id: <20201228125052.634491775@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@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: Lukas Wunner commit 0e685017c7ba1a2fe9f6f1e7a9302890747d934c upstream. If the call to of_device_get_match_data() fails on probe of the Atmel QuadSPI driver, the clock "aq->pclk" is erroneously not unprepared and disabled. Fix it. Fixes: 2e5c88887358 ("spi: atmel-quadspi: add support for sam9x60 qspi controller") Signed-off-by: Lukas Wunner Cc: # v5.1+ Cc: Tudor Ambarus Cc: Boris Brezillon Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/8f8dc2815aa97b2378528f08f923bf81e19611f0.1604874488.git.lukas@wunner.de Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- drivers/spi/atmel-quadspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/spi/atmel-quadspi.c +++ b/drivers/spi/atmel-quadspi.c @@ -591,7 +591,7 @@ static int atmel_qspi_probe(struct platf if (!aq->caps) { dev_err(&pdev->dev, "Could not retrieve QSPI caps\n"); err = -EINVAL; - goto exit; + goto disable_pclk; } if (aq->caps->has_qspick) {