projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Staging: iio: light: fix dangling pointers
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
staging
/
iio
/
light
/
tsl2563.c
diff --git
a/drivers/staging/iio/light/tsl2563.c
b/drivers/staging/iio/light/tsl2563.c
index 1ba4aa392f6e75955415c7bd2f8e1bc16a9e74e2..8770a00e365225239b98e0f46e4868a02e1957fa 100644
(file)
--- a/
drivers/staging/iio/light/tsl2563.c
+++ b/
drivers/staging/iio/light/tsl2563.c
@@
-682,6
+682,7
@@
static int __devinit tsl2563_probe(struct i2c_client *client,
fail2:
iio_device_unregister(chip->indio_dev);
fail1:
+ i2c_set_clientdata(client, NULL);
kfree(chip);
return err;
}
@@
-692,6
+693,7
@@
static int tsl2563_remove(struct i2c_client *client)
iio_device_unregister(chip->indio_dev);
+ i2c_set_clientdata(client, NULL);
kfree(chip);
return 0;
}