Re: [PATCH v2 2/3][RESEND] backlight: ot200_bl: use devm_ functions

From: Axel Lin
Date: Tue Jun 12 2012 - 02:25:42 EST


>  error_mfgpt_alloc:
>        gpio_free(GPIO_DIMM);

You can also use devm_gpio_request, so you can remove gpio_free here
and remove the gpio_free in ot200_backlight_remove().

> @@ -141,7 +139,6 @@ error_mfgpt_alloc:
>  static int ot200_backlight_remove(struct platform_device *pdev)
>  {
>        struct backlight_device *bl = platform_get_drvdata(pdev);
> -       struct ot200_backlight_data *data = bl_get_data(bl);
>
>        backlight_device_unregister(bl);
>
> @@ -154,7 +151,6 @@ static int ot200_backlight_remove(struct platform_device *pdev)
>        cs5535_mfgpt_free_timer(pwm_timer);
>        gpio_free(GPIO_DIMM);
>
> -       kfree(data);
>        return 0;
>  }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/