]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (nct6775) Drop duplicate NULL check in ->init() and ->exit()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 10 Jun 2022 10:33:24 +0000 (13:33 +0300)
committerGuenter Roeck <linux@roeck-us.net>
Wed, 13 Jul 2022 15:38:20 +0000 (08:38 -0700)
commit0697b8399aa79a14fda0e85b7026198921b9892e
tree8cd53ef0cf3dd96b05792bae6f248dcee03963e8
parenta08af8f8a989a1ec6c34662991566bb9be94ee05
hwmon: (nct6775) Drop duplicate NULL check in ->init() and ->exit()

Since platform_device_unregister() is NULL-aware, we don't need to duplicate
this check. Remove it and fold the rest of the code.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Zev Weiss <zev@bewilderbeest.net>
Link: https://lore.kernel.org/r/20220610103324.87483-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/nct6775-platform.c