]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
hwmon: (lm75) Add explicit default cases in lm75_is_visible()
authorFlaviu Nistor <flaviu.nistor@gmail.com>
Fri, 17 Apr 2026 05:57:00 +0000 (08:57 +0300)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 24 May 2026 20:54:01 +0000 (13:54 -0700)
Add explicit default labels to switch statements in lm75_is_visible().

This makes the control flow explicit and improves readability, but also
keeps consistency to other usage of the switch statement in the driver.

Signed-off-by: Flaviu Nistor <flaviu.nistor@gmail.com>
Link: https://lore.kernel.org/r/20260417055700.5739-1-flaviu.nistor@gmail.com
[groeck: Reformatted description for line length]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/lm75.c

index c283443e363b4270151ad1060e685e26010e54e3..a47ce32df98328ed5e1ba87f9bd16463f650be4d 100644 (file)
@@ -539,6 +539,8 @@ static umode_t lm75_is_visible(const void *data, enum hwmon_sensor_types type,
                        if (config_data->params->num_sample_times > 1)
                                return 0644;
                        return 0444;
+               default:
+                       break;
                }
                break;
        case hwmon_temp:
@@ -555,6 +557,8 @@ static umode_t lm75_is_visible(const void *data, enum hwmon_sensor_types type,
                        if (config_data->params->alarm)
                                return 0444;
                        break;
+               default:
+                       break;
                }
                break;
        default: