lkml.org 
[lkml]   [2017]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] spi: davinci: Fix compilation warning.
Date
If CONFIG_OF is disable, it'll through compilation warning.

drivers/spi/spi-davinci.c: In function ‘spi_davinci_get_pdata’:
drivers/spi/spi-davinci.c:880:2: warning: return makes pointer from integer without a cast [enabled by default]
return -ENODEV;

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/spi/spi-davinci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-davinci.c b/drivers/spi/spi-davinci.c
index 2b0805d..93a4009 100644
--- a/drivers/spi/spi-davinci.c
+++ b/drivers/spi/spi-davinci.c
@@ -877,7 +877,7 @@ static int spi_davinci_get_pdata(struct platform_device *pdev,
*spi_davinci_get_pdata(struct platform_device *pdev,
struct davinci_spi *dspi)
{
- return -ENODEV;
+ return ERR_PTR(-ENODEV);
}
#endif

--
1.9.1
\
 
 \ /
  Last update: 2017-06-12 00:21    [W:0.060 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site