Re: [PATCH V2 05/18] regulator: fixed: use devm_regulator_register()

From: Sachin Kamat
Date: Thu Sep 26 2013 - 02:14:12 EST


Hi Jingoo,

On 26 September 2013 07:35, Jingoo Han <jg1.han@xxxxxxxxxxx> wrote:
> Use devm_regulator_register() to make cleanup paths simpler.

> struct fixed_voltage_data *drvdata = platform_get_drvdata(pdev);
>
> - regulator_unregister(drvdata->dev);
> kfree(drvdata->desc.supply_name);
> kfree(drvdata->desc.name);

Sorry, couldn't go through all your patches yesterday.
This one looks a bit scary too as some of the driver data is already
freed before unregistering.

--
With warm regards,
Sachin
--
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/