From patchwork Mon Jul 19 14:53:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 480013 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp4280787jao; Mon, 19 Jul 2021 09:22:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGP3gKFd5LRrXykPeAOhKTA3pXcBkMDpW5lUBsp7dIJBpMmHyFB11HOFLdgneBbcrRzO3u X-Received: by 2002:a17:906:4098:: with SMTP id u24mr27861302ejj.462.1626711691669; Mon, 19 Jul 2021 09:21:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626711691; cv=none; d=google.com; s=arc-20160816; b=K59Wz9rmKV0SZhsjVU+r6AI/ps+6ITg9eM2J+n+qAap+XfVEO4a5af8kuorLOCgjTp /+Ke1NnQekVvhMNIgZldipGXn/5rxDeYEc8hWTu8FiSXtELmZgX7+v5mRoQkEEwbBg04 bZX3aOV7O1z9jnlJTmM1eSvESE4LPwy8MatshF1AdzP3staHzz/YwtKylA0su/btClMY 9Ddu6q0/eRKT06dXcolGEQHMlAIx/pOwluu0k22Z+FdC4KRRG9oIpD8c6UUGMmkOCNiT wqAnBdVhcpxaC7mf3/lC/33TJqiT3WxSCWBUWBcfvTrBuV0Zb8knpQqt3RWIzrbRmL9a kEgw== 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=69tjZ2zzIfmrEJGESenS/v+LF9JAyLcrIXo0lc7yzGY=; b=t1fU7TqjkWPDRSJkWpb4ZAEM2JpghlkkyI/FPHxDuCvD97jTbjDucz7yriV9VTrPcJ RMJ2VZUMO02XzPC47yzfccrfCUUNB7yXskjuiV/CqAUaJD3BYpsA4a9/gpx6X2QzvBnj zcVzLL3zwT9d31M/S975On1MRjoZQhaVpnNdm181dm8q93FmRv3XEy/avRBf4ysv7t+1 /I2upNT9sGFUm7tFj4ncu6J0wmuHUgujz650nNh6CYfSOZfHZmT+NeafT205Drln9MU9 jTyk02UltZ7krYCEcoxouqg3v6d4di6X6pIuompQnQG3EjTdCKvJRL4E0dnbds7r4U7P 8uAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=H+7dDrho; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 la14si22045543ejc.142.2021.07.19.09.21.31; Mon, 19 Jul 2021 09:21:31 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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=H+7dDrho; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 S1343893AbhGSPi3 (ORCPT + 12 others); Mon, 19 Jul 2021 11:38:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:59814 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348572AbhGSPf0 (ORCPT ); Mon, 19 Jul 2021 11:35:26 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EAB0361874; Mon, 19 Jul 2021 16:14:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626711249; bh=AKVM094S9hETqyUbQn8sr7ctprk28CH6Lm3lAlLO+U4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H+7dDrhoHm0HkAdJwtFM/KOGJQ8xCwOvaj4/lvvb09y24/+6ewwj4DA01oAPXRmd3 BmSb+tM1Zy6MHfrow96CJzvP3MwdKHFcaiKQVdU681zvZWkTFnAOTtcXjzm/lsg621 JDtpRJEI6z2XR9WUO9NPe/Uzy/qA7Xi6CcrDdgI4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Zhen Lei , Krzysztof Kozlowski , Sasha Levin Subject: [PATCH 5.13 284/351] memory: pl353: Fix error return code in pl353_smc_probe() Date: Mon, 19 Jul 2021 16:53:50 +0200 Message-Id: <20210719144954.431396224@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144944.537151528@linuxfoundation.org> References: <20210719144944.537151528@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Zhen Lei [ Upstream commit 76e5624f3f9343a621dd3f4006f4e4d9c3f91e33 ] When no child nodes are matched, an appropriate error code -ENODEV should be returned. However, we currently do not explicitly assign this error code to 'err'. As a result, 0 was incorrectly returned. Fixes: fee10bd22678 ("memory: pl353: Add driver for arm pl353 static memory controller") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210515040004.6983-1-thunder.leizhen@huawei.com Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sasha Levin --- drivers/memory/pl353-smc.c | 1 + 1 file changed, 1 insertion(+) -- 2.30.2 diff --git a/drivers/memory/pl353-smc.c b/drivers/memory/pl353-smc.c index 9c0a28416777..b0b251bb207f 100644 --- a/drivers/memory/pl353-smc.c +++ b/drivers/memory/pl353-smc.c @@ -407,6 +407,7 @@ static int pl353_smc_probe(struct amba_device *adev, const struct amba_id *id) break; } if (!match) { + err = -ENODEV; dev_err(&adev->dev, "no matching children\n"); goto out_clk_disable; }