mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 11:33:28 +02:00
net: macb: Check return value of dma_set_mask_and_coherent()
Issue flagged by coverity. Add a safety check for the return value of dma_set_mask_and_coherent, go to a safe exit if it returns error. Link: https://scan7.scan.coverity.com/#/project-view/53936/11354?selectedIssue=1643754 Signed-off-by: Sergio Perez Gonzalez <sperezglz@gmail.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> Link: https://patch.msgid.link/20250526032034.84900-1-sperezglz@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
126cd7852a
commit
3920a75880
|
|
@ -5283,7 +5283,11 @@ static int macb_probe(struct platform_device *pdev)
|
|||
|
||||
#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
|
||||
if (GEM_BFEXT(DAW64, gem_readl(bp, DCFG6))) {
|
||||
dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(44));
|
||||
err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(44));
|
||||
if (err) {
|
||||
dev_err(&pdev->dev, "failed to set DMA mask\n");
|
||||
goto err_out_free_netdev;
|
||||
}
|
||||
bp->hw_dma_cap |= HW_DMA_CAP_64B;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user