Skip to content

Commit 981387e

Browse files
prabhakarladr-vignesh
authored andcommitted
mtd: hyperbus: 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_hb_probe() callback with error code. Fixes: 5de15b6 ("mtd: hyperbus: add Renesas RPC-IF driver") Signed-off-by: Lad Prabhakar <[email protected]> Signed-off-by: Vignesh Raghavendra <[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]
1 parent fa55b7d commit 981387e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/mtd/hyperbus/rpc-if.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ static int rpcif_hb_probe(struct platform_device *pdev)
124124
if (!hyperbus)
125125
return -ENOMEM;
126126

127-
rpcif_sw_init(&hyperbus->rpc, pdev->dev.parent);
127+
error = rpcif_sw_init(&hyperbus->rpc, pdev->dev.parent);
128+
if (error)
129+
return error;
128130

129131
platform_set_drvdata(pdev, hyperbus);
130132

0 commit comments

Comments
 (0)