Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 17f330ce authored by Matt Ranostay's avatar Matt Ranostay Committed by Mauro Carvalho Chehab
Browse files

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: default avatarMatt Ranostay <matt.ranostay@konsulko.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 38566d28
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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