Re: [PATCH] extcon: max8997: Add missing kfree for info->edev in max8997_muic_remove()

From: Axel Lin
Date: Sun Jun 17 2012 - 22:54:23 EST


2012/6/18 íëì <myungjoo.ham@xxxxxxxxxxx>:
>> extcon_dev_unregister(info->edev) doest not free info->edev, we need to call
>> kfree(info->edev) here.
>>
>> Signed-off-by: Axel Lin <axel.lin@xxxxxxxxx>
>
> The patch is correct.
>
> However, using devm_kzalloc at probe and removing kfree at remove appears to be much better.
Yes, But I think Greg may prefer this one-linear for 3.5.
And another patch for the devm_kcalloc conversion for 3.6.

Regards,
Axel
--
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/