From patchwork Mon Jul 19 14:54:58 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: 480037 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp4296910jao; Mon, 19 Jul 2021 09:43:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQzDJh97pXoQaifef6+83NOFWHRsJYUub1VFANixYYunWRBw1ZnYstP/OkDdy67dm4jbOX X-Received: by 2002:a17:906:4098:: with SMTP id u24mr27951111ejj.462.1626712997091; Mon, 19 Jul 2021 09:43:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626712997; cv=none; d=google.com; s=arc-20160816; b=QHBUSHz95I52DSxKehyU3S7LcR5u1VZON9FZnmDrE/Jbc3wZ2XZpVa7RGAHc09FoiN KGbtgfmrT0XeX7i1SVlG5vgHVsFEZQ7PbdfzfC9lYADMfM8gZYjd2k6IF57FGXFkt4uE dG5NS5sh1Q7XlwOOMC58bygoa5GszfI+ROwPQMkweMMQjUBqHI5Cc2HiJSThBAuNEU58 g0rGTBsMYX594kz+QISD7B3ETQMCq31kBQ+6nYYTJf4uI38x0lCjyPBLfPNVBWVaPU6r EF9GPfZqLEycphFnTV4j2J+4PEs3D4BDEBaC4gGaZ6LjBTS2jq5A3YKNQxx0p0TQKCzX k6pQ== 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=aY1L0C6YFWQV2wb4XeMyyqfUvSaJ1Wt6fo+KdeWI0seBxaD2HJL3IhSrs2tOYnZo0R /DA2KU2SbO9aOrizfXMpj+PEwEaPrVL+xRURIei8bdOrrQgXMCQRw8cI3maisMQcbstE j2OeMDD/yHWPl0t3jes0Zm7snya1dR5BbaZsUwwxZ1PsFSWUgLy12zz9IoMSui0Xq/uT /GV8XrSzW0Mhcvyv1KrLxZyYmZ6w3rtHY6Zm4J3Atvvy+gU2tAXeDmRRE6WiOpk1NZ1n Dyp1akPFLM6C0aNmeis2e2dZ8g18oKewF/Chm7XBdKMlQ/kkWc6RraqEltyPse4SwIO+ zk9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wr+fSoGL; 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.43.16; Mon, 19 Jul 2021 09:43:17 -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=wr+fSoGL; 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 S1348105AbhGSPwn (ORCPT + 12 others); Mon, 19 Jul 2021 11:52:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:49840 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347039AbhGSPrZ (ORCPT ); Mon, 19 Jul 2021 11:47:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9124561415; Mon, 19 Jul 2021 16:27:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626712062; bh=AKVM094S9hETqyUbQn8sr7ctprk28CH6Lm3lAlLO+U4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wr+fSoGLkVjKpzwjz6y/91ldsCA/OiDwD14VIuJdtiMWwAZcqIPTu+mkm3Vd40Dw0 9P4BC+8wojL8T4zehSftA0yqPpYyeugRlraQwZhOFFbOuoFa/QxZRLNr+a9JxUPToY hYekcg+ytzYaOEl9cABxKfNyqclGCbO4n//y5H1w= 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.12 236/292] memory: pl353: Fix error return code in pl353_smc_probe() Date: Mon, 19 Jul 2021 16:54:58 +0200 Message-Id: <20210719144950.721717720@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144942.514164272@linuxfoundation.org> References: <20210719144942.514164272@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; }