The compiler can't tell that some variables will be initialized,
and gives a warning. Initializing the variables prevents the
warning.
int ret = 0;
char *input, *arg;
static int status = 0;
- struct led_set_state_return retval;
- u32 led, brightness, blink_fade, color_state;
+ struct led_set_state_return retval = { 0 };
+ u32 led = NUCLED_WMI_POWER_COLOR_BLUE;
+ u32 brightness = 100;
+ u32 blink_fade = NUCLED_WMI_ALWAYS_ON;
+ u32 color_state = NUCLED_WMI_POWER_COLOR_BLUE;
// Move buffer from user space to kernel space
input = vmalloc(len);