projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6272c0d
)
iio: adc: Max9611: checking for ERR_PTR instead of NULL in probe
author
Dan Carpenter
<dan.carpenter@oracle.com>
Thu, 20 Apr 2017 10:26:18 +0000
(13:26 +0300)
committer
Jonathan Cameron
<jic23@kernel.org>
Wed, 26 Apr 2017 06:24:48 +0000
(07:24 +0100)
devm_iio_device_alloc() doesn't return ERR_PTRs, it returns NULLs.
Fixes:
69780a3bbc0b
("iio: adc: Add Maxim max9611 ADC driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/adc/max9611.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/iio/adc/max9611.c
b/drivers/iio/adc/max9611.c
index ec82106480e124d6188ddb0a000c13bfb3addb76..dc3869bf324843463ee3b4270b02b9a2578811ba 100644
(file)
--- a/
drivers/iio/adc/max9611.c
+++ b/
drivers/iio/adc/max9611.c
@@
-536,8
+536,8
@@
static int max9611_probe(struct i2c_client *client,
int ret;
indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*max9611));
- if (
IS_ERR(indio_dev)
)
- return
PTR_ERR(indio_dev)
;
+ if (
!indio_dev
)
+ return
-ENOMEM
;
i2c_set_clientdata(client, indio_dev);