Skip to content

Commit 63a796b

Browse files
LorenzoBianconikuba-moo
authored andcommitted
net: airoha: honor reset return value in airoha_hw_init()
Take into account return value from reset_control_bulk_assert and reset_control_bulk_deassert routines in airoha_hw_init(). Signed-off-by: Lorenzo Bianconi <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/f49dc04a87653e0155f4fab3e3eb584785c8ad6a.1722699555.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski <[email protected]>
1 parent c4e2ced commit 63a796b

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

drivers/net/ethernet/mediatek/airoha_eth.c

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2071,13 +2071,21 @@ static int airoha_hw_init(struct platform_device *pdev,
20712071
int err, i;
20722072

20732073
/* disable xsi */
2074-
reset_control_bulk_assert(ARRAY_SIZE(eth->xsi_rsts), eth->xsi_rsts);
2074+
err = reset_control_bulk_assert(ARRAY_SIZE(eth->xsi_rsts),
2075+
eth->xsi_rsts);
2076+
if (err)
2077+
return err;
2078+
2079+
err = reset_control_bulk_assert(ARRAY_SIZE(eth->rsts), eth->rsts);
2080+
if (err)
2081+
return err;
20752082

2076-
reset_control_bulk_assert(ARRAY_SIZE(eth->rsts), eth->rsts);
2077-
msleep(20);
2078-
reset_control_bulk_deassert(ARRAY_SIZE(eth->rsts), eth->rsts);
20792083
msleep(20);
2084+
err = reset_control_bulk_deassert(ARRAY_SIZE(eth->rsts), eth->rsts);
2085+
if (err)
2086+
return err;
20802087

2088+
msleep(20);
20812089
err = airoha_fe_init(eth);
20822090
if (err)
20832091
return err;

0 commit comments

Comments
 (0)