[PATCH] Staging: android: Fix timed_gpio_probe() 'ret' value in case of NULL platform_data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Elad Wexler <elad.wexler@xxxxxxxxx>

'timed_gpio_probe()' shall return -ENXIO (no such address or device) in case of NULL platform data.
-EBUSY doesn't reflect this error.

Signed-off-by: Elad Wexler <elad.wexler@xxxxxxxxx>
---
 drivers/staging/android/timed_gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/android/timed_gpio.c b/drivers/staging/android/timed_gpio.c
index e814514..964a03a 100644
--- a/drivers/staging/android/timed_gpio.c
+++ b/drivers/staging/android/timed_gpio.c
@@ -88,7 +88,7 @@ static int timed_gpio_probe(struct platform_device *pdev)
 	int i, ret;
 
 	if (!pdata)
-		return -EBUSY;
+		return -ENXIO;
 
 	gpio_data = kzalloc(sizeof(struct timed_gpio_data) * pdata->num_gpios,
 			GFP_KERNEL);
-- 
1.8.3.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux