[PATCH 05/11] clk: Versatile Express clock generators ("osc") driver

Linus Walleij linus.walleij at linaro.org
Tue Sep 11 14:00:38 EDT 2012


On Tue, Sep 11, 2012 at 6:10 PM, Pawel Moll <pawel.moll at arm.com> wrote:
> On Mon, 2012-09-10 at 20:14 +0100, Mike Turquette wrote:
(...)
>> > +       osc = kzalloc(sizeof(*osc), GFP_KERNEL);
(...)
>> Minor nitpick: the error label tries to free osc, which in this case
>> shouldn't be freed because it is NULL.
>>
>> > +       kfree(osc);
(...)
> $ grep kfree scripts/checkpatch.pl
(...)
> $ grep -B2 kfree Documentation/CodingStyle

Can't you just use devm_kzalloc(&vecdev->dev, ...) and be done with it?

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list