Loading drivers/leds/leds-pwm.c +2 −5 Original line number Diff line number Diff line Loading @@ -57,7 +57,8 @@ static int led_pwm_probe(struct platform_device *pdev) if (!pdata) return -EBUSY; leds_data = kzalloc(sizeof(struct led_pwm_data) * pdata->num_leds, leds_data = devm_kzalloc(&pdev->dev, sizeof(struct led_pwm_data) * pdata->num_leds, GFP_KERNEL); if (!leds_data) return -ENOMEM; Loading Loading @@ -103,8 +104,6 @@ static int led_pwm_probe(struct platform_device *pdev) } } kfree(leds_data); return ret; } Loading @@ -121,8 +120,6 @@ static int __devexit led_pwm_remove(struct platform_device *pdev) pwm_free(leds_data[i].pwm); } kfree(leds_data); return 0; } Loading Loading
drivers/leds/leds-pwm.c +2 −5 Original line number Diff line number Diff line Loading @@ -57,7 +57,8 @@ static int led_pwm_probe(struct platform_device *pdev) if (!pdata) return -EBUSY; leds_data = kzalloc(sizeof(struct led_pwm_data) * pdata->num_leds, leds_data = devm_kzalloc(&pdev->dev, sizeof(struct led_pwm_data) * pdata->num_leds, GFP_KERNEL); if (!leds_data) return -ENOMEM; Loading Loading @@ -103,8 +104,6 @@ static int led_pwm_probe(struct platform_device *pdev) } } kfree(leds_data); return ret; } Loading @@ -121,8 +120,6 @@ static int __devexit led_pwm_remove(struct platform_device *pdev) pwm_free(leds_data[i].pwm); } kfree(leds_data); return 0; } Loading