Loading drivers/leds/leds-atmel-pwm.c +2 −3 Original line number Diff line number Diff line Loading @@ -46,7 +46,8 @@ static int __devinit pwmled_probe(struct platform_device *pdev) if (!pdata || pdata->num_leds < 1) return -ENODEV; leds = kcalloc(pdata->num_leds, sizeof(*leds), GFP_KERNEL); leds = devm_kzalloc(&pdev->dev, pdata->num_leds * sizeof(*leds), GFP_KERNEL); if (!leds) return -ENOMEM; Loading Loading @@ -108,7 +109,6 @@ static int __devinit pwmled_probe(struct platform_device *pdev) pwm_channel_free(&leds[i].pwmc); } } kfree(leds); return status; } Loading @@ -129,7 +129,6 @@ static int __exit pwmled_remove(struct platform_device *pdev) pwm_channel_free(&led->pwmc); } kfree(leds); platform_set_drvdata(pdev, NULL); return 0; } Loading Loading
drivers/leds/leds-atmel-pwm.c +2 −3 Original line number Diff line number Diff line Loading @@ -46,7 +46,8 @@ static int __devinit pwmled_probe(struct platform_device *pdev) if (!pdata || pdata->num_leds < 1) return -ENODEV; leds = kcalloc(pdata->num_leds, sizeof(*leds), GFP_KERNEL); leds = devm_kzalloc(&pdev->dev, pdata->num_leds * sizeof(*leds), GFP_KERNEL); if (!leds) return -ENOMEM; Loading Loading @@ -108,7 +109,6 @@ static int __devinit pwmled_probe(struct platform_device *pdev) pwm_channel_free(&leds[i].pwmc); } } kfree(leds); return status; } Loading @@ -129,7 +129,6 @@ static int __exit pwmled_remove(struct platform_device *pdev) pwm_channel_free(&led->pwmc); } kfree(leds); platform_set_drvdata(pdev, NULL); return 0; } Loading