Fix the below ignoring return value warning for device_reset. drivers/staging/mt7621-dma/mtk-hsdma.c:685:2: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result] device_reset(&pdev->dev); ^~~~~~~~~~~~ ~~~~~~~~~~ drivers/staging/ralink-gdma/ralink-gdma.c:836:2: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result] device_reset(&pdev->dev); ^~~~~~~~~~~~ ~~~~~~~~~~ Signed-off-by: Youling Tang <tangyouling@xxxxxxxxxxx> --- drivers/staging/mt7621-dma/mtk-hsdma.c | 6 +++++- drivers/staging/ralink-gdma/ralink-gdma.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/staging/mt7621-dma/mtk-hsdma.c b/drivers/staging/mt7621-dma/mtk-hsdma.c index bc4bb43..d4ffa52 100644 --- a/drivers/staging/mt7621-dma/mtk-hsdma.c +++ b/drivers/staging/mt7621-dma/mtk-hsdma.c @@ -682,7 +682,11 @@ static int mtk_hsdma_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 device\n"); + return ret; + } dd = &hsdma->ddev; dma_cap_set(DMA_MEMCPY, dd->cap_mask); diff --git a/drivers/staging/ralink-gdma/ralink-gdma.c b/drivers/staging/ralink-gdma/ralink-gdma.c index 655df31..df99c47 100644 --- a/drivers/staging/ralink-gdma/ralink-gdma.c +++ b/drivers/staging/ralink-gdma/ralink-gdma.c @@ -833,7 +833,11 @@ 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 device\n"); + return ret; + } dd = &dma_dev->ddev; dma_cap_set(DMA_MEMCPY, dd->cap_mask); -- 2.1.0 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel