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 <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20211025205631.21151-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 134a723 commit 0b0a281

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

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)