Skip to content

Commit 7b027c2

Browse files
Zhang Changzhongkuba-moo
Zhang Changzhong
authored andcommitted
net: b44: fix error return code in b44_init_one()
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 39a6f4b ("b44: replace the ssb_dma API with the generic DMA API") Reported-by: Hulk Robot <[email protected]> Signed-off-by: Zhang Changzhong <[email protected]> Reviewed-by: Michael Chan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent cb47d16 commit 7b027c2

File tree

1 file changed

+2
-1
lines changed
  • drivers/net/ethernet/broadcom

1 file changed

+2
-1
lines changed

drivers/net/ethernet/broadcom/b44.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2383,7 +2383,8 @@ static int b44_init_one(struct ssb_device *sdev,
23832383
goto err_out_free_dev;
23842384
}
23852385

2386-
if (dma_set_mask_and_coherent(sdev->dma_dev, DMA_BIT_MASK(30))) {
2386+
err = dma_set_mask_and_coherent(sdev->dma_dev, DMA_BIT_MASK(30));
2387+
if (err) {
23872388
dev_err(sdev->dev,
23882389
"Required 30BIT DMA mask unsupported by the system\n");
23892390
goto err_out_powerdown;

0 commit comments

Comments
 (0)