From: Peng Fan Date: Sun, 30 Aug 2015 08:12:57 +0000 (+0800) Subject: staging: iio: adc: lpc32xx: use correct reutrn value X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f6707ef7a3c9196faee1841f4d12e990239f5dae;p=linux-beck.git staging: iio: adc: lpc32xx: use correct reutrn value To lpc32xx_adc driver, when platform_get_resource or platform_get_irq failed, we should use -ENXIO as a return value, but not -EBUSY. Signed-off-by: Peng Fan Cc: Jonathan Cameron Cc: Hartmut Knaack Cc: Lars-Peter Clausen Cc: Peter Meerwald Cc: Greg Kroah-Hartman Cc: Tapasweni Pathak Signed-off-by: Jonathan Cameron --- diff --git a/drivers/staging/iio/adc/lpc32xx_adc.c b/drivers/staging/iio/adc/lpc32xx_adc.c index 5331c442fcfc..bcf4ebb2e3ab 100644 --- a/drivers/staging/iio/adc/lpc32xx_adc.c +++ b/drivers/staging/iio/adc/lpc32xx_adc.c @@ -137,7 +137,7 @@ static int lpc32xx_adc_probe(struct platform_device *pdev) res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!res) { dev_err(&pdev->dev, "failed to get platform I/O memory\n"); - return -EBUSY; + return -ENXIO; } iodev = devm_iio_device_alloc(&pdev->dev, sizeof(*info)); @@ -162,7 +162,7 @@ static int lpc32xx_adc_probe(struct platform_device *pdev) irq = platform_get_irq(pdev, 0); if (irq <= 0) { dev_err(&pdev->dev, "failed getting interrupt resource\n"); - return -EINVAL; + return -ENXIO; } retval = devm_request_irq(&pdev->dev, irq, lpc32xx_adc_isr, 0,