Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3854866pxv; Mon, 19 Jul 2021 10:19:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRF2vJV0Ky+ud2IOZnBl4zG6ujfzo9Yp0sCD8xgq5sXIMNPm9maaYu3Ff4kc5oj3cPMDdl X-Received: by 2002:a92:a00e:: with SMTP id e14mr17859344ili.126.1626715181743; Mon, 19 Jul 2021 10:19:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626715181; cv=none; d=google.com; s=arc-20160816; b=I4zMRlGLPDobUlLuUt8Mv1PX3F7GabENxMvFAcEE06J5MCHkp/12V980t58Brod5yE iokJWWZRxtiH640O7fImKSPfIJlkhWY2SxMNxcsbVB3In9L0vdDWQkCVKd86bhXrfTDQ yH5rf9cNe9Y/BL5fRN2xex+BVqePGrKTK/Uk36bL4jB8xBFe+kfYq26i5c4eLQAFIWw4 wKbTARPhPiAs39yo+85mCi1KksfAQ3iLwVr8KMmPNHcFtW99thaHjfroPiAKduc5g+73 nEuwtFRpqGc1SyWMAzepncFDCpS9PV0bb1PqwrQSBLrIq6caCWblDgFHPXV77JIiEjcF nmNg== 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=MLrQpY6cxtRtUn4xn9PaZLFBhFdmqnVkWSEL0uuWeyIMx593QPEprL0V/7lB1zxje+ tzkrydWxqvz31hoXs3UYj6dLsatZ06NL3ScTEdhKnQZxcR/dzO52bVgcRXa+wwa+wvCh y/XOHzARwNl3E2+cYGQHxPqjZbb1TShn7TQIXy8CYGcnuUc+rxJFMc/bqkwV0dliaHQt In8I0T9eoXuf9jGLi8B6Ij/fRthLJrwQ9GEx7IBX0VV5pkxnNLWFulGFdcmqO0nU/srB aojRdKmkN8agZEv7mhGl8DckuhxT/v5DfPwCVMUV3HBK970AV5OenypBRASCTUkjfWhx IwsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jZJyOQ0w; 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 l11si20078398ilo.83.2021.07.19.10.19.29; Mon, 19 Jul 2021 10:19:41 -0700 (PDT) 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=jZJyOQ0w; 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 S1354911AbhGSQfc (ORCPT + 99 others); Mon, 19 Jul 2021 12:35:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:38166 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347858AbhGSPWK (ORCPT ); Mon, 19 Jul 2021 11:22:10 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9C9ED613AE; Mon, 19 Jul 2021 15:59:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626710391; bh=nXyHw/DQ+3MHnoET8dBcqqnuoyNIonAdyS8lNG25KEU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jZJyOQ0wyzZ+LKIx6TERvItNk8rs6qA4Lw8JIKBLmeYgkvzLPb8UH0xRKnNprwphj pHHZPviKd2kT9mfqbAwtXmBzE1k7M7wpUtbxksR8/niwUwfEA1unXNeke8QfQKwcXM R5crBx3BT7cwyLub+dYdT7LAHEvyblwF9or66ICg= 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.10 197/243] memory: pl353: Fix error return code in pl353_smc_probe() Date: Mon, 19 Jul 2021 16:53:46 +0200 Message-Id: <20210719144947.288786629@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144940.904087935@linuxfoundation.org> References: <20210719144940.904087935@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: 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(+) 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; } -- 2.30.2