Skip to content

Commit 91cd175

Browse files
dja-dja-maddavem330
authored andcommitted
irda/sa1100_ir: check return value of startup hook
Signed-off-by: Dmitry Artamonow <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 8558467 commit 91cd175

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

drivers/net/irda/sa1100_ir.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,11 @@ static int sa1100_irda_startup(struct sa1100_irda *si)
232232
/*
233233
* Ensure that the ports for this device are setup correctly.
234234
*/
235-
if (si->pdata->startup)
236-
si->pdata->startup(si->dev);
235+
if (si->pdata->startup) {
236+
ret = si->pdata->startup(si->dev);
237+
if (ret)
238+
return ret;
239+
}
237240

238241
/*
239242
* Configure PPC for IRDA - we want to drive TXD2 low.

0 commit comments

Comments
 (0)