mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 12:14:06 +00:00
leds: trigger: netdev: uninitialized variable in netdev_trig_activate()
The qca8k_cled_hw_control_get() function which implements ->hw_control_get
sets the appropriate bits but does not clear them. This leads to an
uninitialized variable bug. Fix this by setting mode to zero at the
start.
Fixes: e0256648c8
("net: dsa: qca8k: implement hw_control ops")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Lee Jones <lee@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f0ec58d557
commit
97c5209b3d
1 changed files with 1 additions and 1 deletions
|
@ -445,7 +445,7 @@ static void netdev_trig_work(struct work_struct *work)
|
|||
static int netdev_trig_activate(struct led_classdev *led_cdev)
|
||||
{
|
||||
struct led_netdev_data *trigger_data;
|
||||
unsigned long mode;
|
||||
unsigned long mode = 0;
|
||||
struct device *dev;
|
||||
int rc;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue