diff options
Diffstat (limited to 'drivers/hwmon/nct6775-platform.c')
-rw-r--r-- | drivers/hwmon/nct6775-platform.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/hwmon/nct6775-platform.c b/drivers/hwmon/nct6775-platform.c index 6d46c9401898..ab30437221ce 100644 --- a/drivers/hwmon/nct6775-platform.c +++ b/drivers/hwmon/nct6775-platform.c @@ -1083,6 +1083,7 @@ static const char * const asus_wmi_boards[] = { "TUF GAMING B550M-PLUS", "TUF GAMING B550M-PLUS (WI-FI)", "TUF GAMING B550-PLUS", + "TUF GAMING B550-PLUS WIFI II", "TUF GAMING B550-PRO", "TUF GAMING X570-PLUS", "TUF GAMING X570-PLUS (WI-FI)", @@ -1200,10 +1201,8 @@ static int __init sensors_nct6775_platform_init(void) exit_device_put: platform_device_put(pdev[i]); exit_device_unregister: - while (--i >= 0) { - if (pdev[i]) - platform_device_unregister(pdev[i]); - } + while (i--) + platform_device_unregister(pdev[i]); exit_unregister: platform_driver_unregister(&nct6775_driver); return err; @@ -1213,10 +1212,8 @@ static void __exit sensors_nct6775_platform_exit(void) { int i; - for (i = 0; i < ARRAY_SIZE(pdev); i++) { - if (pdev[i]) - platform_device_unregister(pdev[i]); - } + for (i = 0; i < ARRAY_SIZE(pdev); i++) + platform_device_unregister(pdev[i]); platform_driver_unregister(&nct6775_driver); } |