memory: pl353: Fix error return code in pl353_smc_probe()
Subsystems (2)
PATCH 1/1 memory: pl353: Fix error return code in pl353_smc_probe()
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 <[email protected]>
Signed-off-by Zhen Lei <[email protected]>
--- drivers/memory/pl353-smc.c | 1 + 1 file changed, 1 insertion(+)
drivers/memory/pl353-smc.c +1 -0
@@ -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; }
Signature · 1 line
2.26.0.106.g9fadedd
Krzysztof Kozlowski
AppliedQuoted 3 lines · Zhen Lei
When no child nodes are matched, an appropriate error code
-ENODEVshould be returned. However, we currently do not explicitly assign this error code to 'err'. As a result, 0 was incorrectly returned.
Applied, thanks!
[1/1] memory: pl353: Fix error return code in pl353_smc_probe()
commit: 76e5624f3f9343a621dd3f4006f4e4d9c3f91e33
Best regards,
Signature · 1 line
Krzysztof Kozlowski <[email protected]>