From patchwork Mon Jul 19 14:53:51 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: 479980 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp4254432jao; Mon, 19 Jul 2021 08:53:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwL0Idj/bOiNHWujs3UhKAFmKMRi+na44NeI1j2sx3Bvij18cc9koiLEuppGarGBMTW0HN8 X-Received: by 2002:a17:906:9513:: with SMTP id u19mr17249747ejx.284.1626709987741; Mon, 19 Jul 2021 08:53:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626709987; cv=none; d=google.com; s=arc-20160816; b=uv8r8PJLvEzx06OpdGnTmHgby+FLK4MkO3mQbAdrTJjdKspg11KCFho90Xghywlwzs +IL6jx5wGEb8vKT1m6fKCA1TjZhd8hgnDyYD2TSJp1Ia7CXDCnqo2qF+KUFj1J2uSFbp cNp+fkX30bBTFNh04cFBfXzuIi0q12ohvyChYtyxx/vHxoQblJsYimjNIEaLGx1wO54o aMeLvWZBYD4RYWDsaZRIo/Yjk4wlXXwwrTKPqganT5/E0UpoQod+UtBbK1/GcznRE/Mw c6fKqnhAXjVf6M2QnBpv0DtWE0p4OV30EXU6CLSyiCyG6smB/AEIdyTAl9eLmAydA4lB ktDw== 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=OLq6Xt4UqB66qfR6lP08cpfSLOsVJTCzl+Hkx+bRzOc=; b=vIlVrdZp4fTzxyuLWmrPvrby8ASdgzpUh0OK1lpmQsmkzoViPY4F4xw698Fcu+qcRh 1FkUiNWIYTtNpIQ1Y4I+x4HYSnZuzwazdE3F286RQ+tTDf4sCOW1GMKMsXlCMFiNwEBg KhiBRdwIhL8B1l5KBrpN92Bq834lfE/JbwaYTNiV+LsHZoRlUF3EhzlNz1mBmjypKgsS gLQ+SUumk99BHC3QowLP9bSlRi7/g8ynrK+rpeaIJNnDdEEaHw4TTzN5XYLbbYPRa3DZ ds048LwyCjVm9ZJSwpUFRICzGOLvPMj9o6fmnbEIJa3ovfd8IqZmK0tGc5LMcOJJiMOb CVsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZaQEYsGL; 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 z16si26773967edm.47.2021.07.19.08.53.07; Mon, 19 Jul 2021 08:53:07 -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=ZaQEYsGL; 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 S1345639AbhGSPMS (ORCPT + 12 others); Mon, 19 Jul 2021 11:12:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:46526 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344072AbhGSPKS (ORCPT ); Mon, 19 Jul 2021 11:10:18 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C933F606A5; Mon, 19 Jul 2021 15:50:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626709853; bh=nXyHw/DQ+3MHnoET8dBcqqnuoyNIonAdyS8lNG25KEU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZaQEYsGLnpANTzIYoLNGnyrrMiQpqSOYwcTqCmjzeLPExvO0Nkv4UyNeu+sKH7Gea Yl8TdlELe5o7wjQ+2RdwCdLwBiuqdtp0eywSXjyQFs4MyCRZ4zzoS/UxmgqyJO1HfF Btq/1GuSJ46YyetU5GCwKijAEui1eblPV4rW+dVg= 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.4 123/149] memory: pl353: Fix error return code in pl353_smc_probe() Date: Mon, 19 Jul 2021 16:53:51 +0200 Message-Id: <20210719144930.479970754@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144901.370365147@linuxfoundation.org> References: <20210719144901.370365147@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 b42804b1801e..cc01979780d8 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; }