linux/ledtrig-netdev: remove `unsigned < 0` check
authorAlexander Couzens <lynxis@fe80.eu>
Sun, 11 Jun 2017 11:30:21 +0000 (13:30 +0200)
committerAlexander Couzens <lynxis@fe80.eu>
Sun, 11 Jun 2017 12:22:44 +0000 (14:22 +0200)
Found-by: Coverity Scan
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
target/linux/generic/files/drivers/leds/ledtrig-netdev.c

index 7246bcaf7e7b91029fa00bc25d8130a1ae95a043..8d3249010d62940028bec9b5c4f123be4a8f6522 100644 (file)
@@ -113,7 +113,7 @@ static ssize_t led_device_name_store(struct device *dev,
        struct led_classdev *led_cdev = dev_get_drvdata(dev);
        struct led_netdev_data *trigger_data = led_cdev->trigger_data;
 
-       if (size < 0 || size >= IFNAMSIZ)
+       if (size >= IFNAMSIZ)
                return -EINVAL;
 
        cancel_delayed_work_sync(&trigger_data->work);