aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/ralink-gdma
diff options
context:
space:
mode:
authorGiovanni Gherdovich <bobdc9664@seznam.cz>2021-03-06 15:13:22 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-10 09:25:33 +0100
commit275b6bd538c473df588868e53587f0f4f3378da3 (patch)
treecf01a0194e7f0b8186f16809fc95c099d0dac077 /drivers/staging/ralink-gdma
parentstaging: wimax: i2400m: fix some incorrect type warnings (diff)
downloadlinux-dev-275b6bd538c473df588868e53587f0f4f3378da3.tar.xz
linux-dev-275b6bd538c473df588868e53587f0f4f3378da3.zip
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>
Diffstat (limited to 'drivers/staging/ralink-gdma')
-rw-r--r--drivers/staging/ralink-gdma/ralink-gdma.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/ralink-gdma/ralink-gdma.c b/drivers/staging/ralink-gdma/ralink-gdma.c
index 655df317d0ee..3c26b665ee7c 100644
--- a/drivers/staging/ralink-gdma/ralink-gdma.c
+++ b/drivers/staging/ralink-gdma/ralink-gdma.c
@@ -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);