1 From 3f6dfa25128e428acfba20792bc7506d58806baa Mon Sep 17 00:00:00 2001
2 From: Christian Marangi <ansuelsmth@gmail.com>
3 Date: Sun, 7 May 2023 01:06:17 +0200
4 Subject: [PATCH] drivers: mt7621-dma: handle error from device_reset
6 Handle error from device reset to fix compilation warning.
7 Fix compilation warning:
8 drivers/staging/mt7621-dma/hsdma-mt7621.c: In function 'mtk_hsdma_probe':
9 drivers/staging/mt7621-dma/hsdma-mt7621.c:685:9: error: ignoring return value of 'device_reset' declared with attribute 'warn_unused_result' [-Werror=unused-result]
10 685 | device_reset(&pdev->dev);
11 | ^~~~~~~~~~~~~~~~~~~~~~~~
12 cc1: all warnings being treated as errors
14 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
16 drivers/staging/mt7621-dma/hsdma-mt7621.c | 4 +++-
17 1 file changed, 3 insertions(+), 1 deletion(-)
19 --- a/drivers/staging/mt7621-dma/hsdma-mt7621.c
20 +++ b/drivers/staging/mt7621-dma/hsdma-mt7621.c
21 @@ -682,7 +682,9 @@ static int mtk_hsdma_probe(struct platfo
25 - device_reset(&pdev->dev);
26 + ret = device_reset(&pdev->dev);
28 + dev_err(&pdev->dev, "failed to reset device\n");
31 dma_cap_set(DMA_MEMCPY, dd->cap_mask);