[PATCH 3/8] mtd: lantiq-flash: Use devm_kzalloc()

Jingoo Han jg1.han at samsung.com
Fri Dec 20 02:14:51 EST 2013


On Friday, December 20, 2013 3:04 PM, John Crispin wrote:
> On 20/12/13 05:58, Jingoo Han wrote:
> >   err_destroy:
> >   	map_destroy(ltq_mtd->mtd);
> >   err_free:
> > -	kfree(ltq_mtd->map);
> >   err_out:
> > -	kfree(ltq_mtd);
> >   	return err;
> >   }
> 
> Hi,
> 
> after the cleanup only err_destroy is needed. the other 2 jump marks can
> be removed aswell.

Hi John Crispin,

I see. You're right.
I will remove unnecessary goto labels such as err_free, err_out.
Thank you for your comment. :-)

Best regards,
Jingoo Han




More information about the linux-mtd mailing list