hwmon: (it87) Check for a valid chip before using force_id
authorAhmad Khalifa <ahmad@khalifa.ws>
Tue, 4 Oct 2022 21:01:03 +0000 (22:01 +0100)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 5 Dec 2022 00:45:02 +0000 (16:45 -0800)
commitb3b19931a5c22f5a09f846e037b23f8a74455d0a
tree8b537a2ce59175a3709289a6a8000deb1588c0b2
parent12c44ab8b401c29d8d3569aaea34da662b8ece1d
hwmon: (it87) Check for a valid chip before using force_id

Check there is a chip before using force_id parameter as there
is no value in registering a non-existent chip

Signed-off-by: Ahmad Khalifa <ahmad@khalifa.ws>
Link: https://lore.kernel.org/r/20221004210100.540120-3-ahmad@khalifa.ws
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/it87.c