staging: ralink-gdma: Check return code of device_reset

The device_reset() function is marked as "__must_check", thus the static
analysis tool "sparse" complains that in ralink-gdma its return value is
ignored. Log a warning in case it returns an error.

Signed-off-by: Giovanni Gherdovich <bobdc9664@seznam.cz>
Link: https://lore.kernel.org/r/20210306141322.7516-1-bobdc9664@seznam.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Giovanni Gherdovich 2021-03-06 15:13:22 +01:00 committed by Greg Kroah-Hartman
parent 60df0e7aaa
commit 275b6bd538
1 changed files with 3 additions and 1 deletions

View File

@ -833,7 +833,9 @@ static int gdma_dma_probe(struct platform_device *pdev)
return ret;
}
device_reset(&pdev->dev);
ret = device_reset(&pdev->dev);
if (ret)
dev_err(&pdev->dev, "failed to reset: %d\n", ret);
dd = &dma_dev->ddev;
dma_cap_set(DMA_MEMCPY, dd->cap_mask);