mtd: hyperbus: rpc-if: Check return value of rpcif_sw_init()
[ Upstream commit 981387ed06b96908223a607f5fba6efa42728fc2 ] rpcif_sw_init() can fail so make sure we check the return value of it and on error exit rpcif_hb_probe() callback with error code. Fixes: 5de15b610f78 ("mtd: hyperbus: add Renesas RPC-IF driver") Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.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-5-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
77d19bad30
commit
6b3a83a450
@ -124,7 +124,9 @@ static int rpcif_hb_probe(struct platform_device *pdev)
|
||||
if (!hyperbus)
|
||||
return -ENOMEM;
|
||||
|
||||
rpcif_sw_init(&hyperbus->rpc, pdev->dev.parent);
|
||||
error = rpcif_sw_init(&hyperbus->rpc, pdev->dev.parent);
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
platform_set_drvdata(pdev, hyperbus);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user