Skip to content

Commit 0b0a281

Browse files
prabhakarladbroonie
authored andcommitted
spi: spi-rpc-if: Check return value of rpcif_sw_init()
rpcif_sw_init() can fail so make sure we check the return value of it and on error exit rpcif_spi_probe() callback with error code. Fixes: eb8d6d4 ("spi: add Renesas RPC-IF driver") Signed-off-by: Lad Prabhakar <[email protected]> Reviewed-by: Biju Das <[email protected]> Reviewed-by: Wolfram Sang <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 134a723 commit 0b0a281

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/spi/spi-rpc-if.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ static int rpcif_spi_probe(struct platform_device *pdev)
139139
return -ENOMEM;
140140

141141
rpc = spi_controller_get_devdata(ctlr);
142-
rpcif_sw_init(rpc, parent);
142+
error = rpcif_sw_init(rpc, parent);
143+
if (error)
144+
return error;
143145

144146
platform_set_drvdata(pdev, ctlr);
145147

0 commit comments

Comments
 (0)