summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2018-07-27 03:47:24 +0200
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-07-27 14:10:34 +0200
commit17f330ce9e434333a98b0fbc7b6d5ddbe0cc6770 (patch)
tree6f748964ab21bcb5414f6e76cb8e96cc2f912c88 /drivers/media/i2c
parentmedia: adv7180: add g_frame_interval support (diff)
downloadlinux-17f330ce9e434333a98b0fbc7b6d5ddbe0cc6770.tar.xz
linux-17f330ce9e434333a98b0fbc7b6d5ddbe0cc6770.zip
media: video-i2c: hwmon: fix return value from amg88xx_hwmon_init()
PTR_ERR was making any pointer passed an error pointer, and should be replaced with PTR_ERR_OR_ZERO which checks if is an actual error condition. Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r--drivers/media/i2c/video-i2c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/video-i2c.c b/drivers/media/i2c/video-i2c.c
index 7dc9338502e5..06d29d8f6be8 100644
--- a/drivers/media/i2c/video-i2c.c
+++ b/drivers/media/i2c/video-i2c.c
@@ -167,7 +167,7 @@ static int amg88xx_hwmon_init(struct video_i2c_data *data)
void *hwmon = devm_hwmon_device_register_with_info(&data->client->dev,
"amg88xx", data, &amg88xx_chip_info, NULL);
- return PTR_ERR(hwmon);
+ return PTR_ERR_OR_ZERO(hwmon);
}
#else
#define amg88xx_hwmon_init NULL