[PATCH] backlight: pwm_bl: Avoid open coded arithmetic in memory allocation

Lee Jones lee.jones at linaro.org
Mon Feb 7 09:31:00 UTC 2022


On Mon, 07 Feb 2022, Uwe Kleine-König wrote:

> On Sat, Feb 05, 2022 at 08:40:48AM +0100, Christophe JAILLET wrote:
> > kmalloc_array()/kcalloc() should be used to avoid potential overflow when
> > a multiplication is needed to compute the size of the requested memory.
> > 
> > So turn a kzalloc()+explicit size computation into an equivalent kcalloc().
> > 
> > Signed-off-by: Christophe JAILLET <christophe.jaillet at wanadoo.fr>
> 
> LGTM
> 
> Acked-by: Christophe JAILLET <christophe.jaillet at wanadoo.fr>
> 
> Thanks
> Uwe

I am totally confused!

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog


More information about the dri-devel mailing list