the ret is got the status returned by the
led_classdev_register, returning ret if the
led_classdev_register fails and returning 0
if the led_classdev_register success, can be done
by doing just "return ret" at the end.
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
if (ret < 0) {
dev_err(&dev->dev, "led_classdev_register failed\n");
kfree(led);
- return ret;
}
- return 0;
+ return ret;
}
static struct platform_driver s3c24xx_led_driver = {