mirror of
https://github.com/torvalds/linux.git
synced 2026-06-06 05:27:07 +02:00
spi: spi-rpc-if: Check return value of rpcif_sw_init()
[ Upstream commit0b0a281ed7] 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:eb8d6d464a("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
5b7b4afead
commit
c3ac751944
|
|
@ -139,7 +139,9 @@ static int rpcif_spi_probe(struct platform_device *pdev)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
rpc = spi_controller_get_devdata(ctlr);
|
rpc = spi_controller_get_devdata(ctlr);
|
||||||
rpcif_sw_init(rpc, parent);
|
error = rpcif_sw_init(rpc, parent);
|
||||||
|
if (error)
|
||||||
|
return error;
|
||||||
|
|
||||||
platform_set_drvdata(pdev, ctlr);
|
platform_set_drvdata(pdev, ctlr);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user