Skip to content

Commit

Permalink
leds: trigger: netdev: reject interval store for hw_control
Browse files Browse the repository at this point in the history
Reject interval store with hw_control enabled. It's are currently not
supported and MUST be set to the default value with hw control enabled.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Christian Marangi authored and David S. Miller committed May 31, 2023
1 parent 6352f25 commit c84c80c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/leds/trigger/ledtrig-netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@ static ssize_t interval_store(struct device *dev,
unsigned long value;
int ret;

if (trigger_data->hw_control)
return -EINVAL;

ret = kstrtoul(buf, 0, &value);
if (ret)
return ret;
Expand Down

0 comments on commit c84c80c

Please sign in to comment.