Skip to content

Commit 42d452d

Browse files
tlendackydavem330
authored andcommitted
amd-xgbe: Handle return code from software reset function
Currently the function that performs a software reset of the hardware provides a return code. During driver probe check this return code and exit with an error if the software reset fails. Signed-off-by: Tom Lendacky <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 9018ff5 commit 42d452d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/net/ethernet/amd/xgbe/xgbe-main.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,11 @@ int xgbe_config_netdev(struct xgbe_prv_data *pdata)
277277
pdata->desc_ded_period = jiffies;
278278

279279
/* Issue software reset to device */
280-
pdata->hw_if.exit(pdata);
280+
ret = pdata->hw_if.exit(pdata);
281+
if (ret) {
282+
dev_err(dev, "software reset failed\n");
283+
return ret;
284+
}
281285

282286
/* Set default configuration data */
283287
xgbe_default_config(pdata);

0 commit comments

Comments
 (0)