mirror of https://gitee.com/openkylin/linux.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 <van.freenix@gmail.com> Cc: Jonathan Cameron <jic23@kernel.org> Cc: Hartmut Knaack <knaack.h@gmx.de> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Peter Meerwald <pmeerw@pmeerw.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
parent
a8dbc64a26
commit
f6707ef7a3
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue