]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
memory: pl353: Fix error return code in pl353_smc_probe()
authorZhen Lei <thunder.leizhen@huawei.com>
Sat, 15 May 2021 04:00:04 +0000 (12:00 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:02:23 +0000 (16:02 +0200)
commit22193e55444d6b1b9853c3afd25b89870f62d1dc
tree353d324d230428fa4763518ab5fb622663c8edb2
parent7f2aca07a9c344b76a9ee88a30352c2b996c1606
memory: pl353: Fix error return code in pl353_smc_probe()

[ 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 <hulkci@huawei.com>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Link: https://lore.kernel.org/r/20210515040004.6983-1-thunder.leizhen@huawei.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/memory/pl353-smc.c