video: fbdev: pxafb: zero allocated memory for video modes
PATCH v2 1/1 video: fbdev: pxafb: zero allocated memory for video modes
When parsing the video modes from DT properties, make sure to zero out memory befor using it. This is important because not all fields in the mode struct are explicitly initialized, even though they are used later on.
---
v2: use kcalloc() instead of open-coding the same through
kmalloc_array(__GFP_ZERO)
drivers/video/fbdev/pxafb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/video/fbdev/pxafb.c +2 -2
@@ -2130,8 +2130,8 @@ static int of_get_pxafb_display(struct device *dev, struct device_node *disp,return -EINVAL ; ret = -ENOMEM ; - info->modes =kmalloc_array (timings->num_timings, -sizeof (info->modes[0 ]),GFP_KERNEL ); + info->modes =kcalloc (timings->num_timings,sizeof (info->modes[0 ]), +GFP_KERNEL );if (!info->modes) goto out; info->num_modes = timings->num_timings;
Signature · 1 line
2.17.1
Quoted 2 lines · Daniel Mack
When parsing the video modes from DT properties, make sure to zero out memory befor using it. This is important because not all fields in the mode
s/befor/before/
This taken care of ...
Cheers.
--
Robert
Quoted 6 lines · Robert Jarzmik
Quoted 2 lines · Daniel Mack
When parsing the video modes from DT properties, make sure to zero out memory befor using it. This is important because not all fields in the mode
s/befor/before/
Yeah, seen this too after sending. Should I resend, or can this be amended when applying?
Quoted 2 lines
This taken care of ...
Reviewed-by Robert Jarzmik <[email protected]>
Thanks,
Daniel
Quoted 10 lines · Daniel Mack
Quoted 6 lines · Robert Jarzmik
Quoted 2 lines · Daniel Mack
When parsing the video modes from DT properties, make sure to zero out memory befor using it. This is important because not all fields in the mode
s/befor/before/
Yeah, seen this too after sending. Should I resend, or can this be amended when applying?
I think this question is for Bartlomiej, as fbdev is his tree ...
Quoted 2 lines
Quoted 2 lines
This taken care of ...
Reviewed-by Robert Jarzmik <[email protected]>
Cheers.
Signature · 1 line
Robert
Quoted 5 lines · Robert Jarzmik
Quoted 3 lines · Daniel Mack
Quoted 2 lines · Robert Jarzmik
Daniel Mack <[email protected]> writes:
Quoted 8 lines
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
When parsing the video modes from DT properties, make sure to zero out memory befor using it. This is important because not all fields in the mode
s/befor/before/
Yeah, seen this too after sending. Should I resend, or can this be amended when applying?
I think this question is for Bartlomiej, as fbdev is his tree ...
I will fix this typo while applying, no need for resend..
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
This taken care of ...
Reviewed-by Robert Jarzmik <[email protected]>
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
Quoted 8 lines · Bartlomiej Zolnierkiewicz
Quoted 7 lines · Robert Jarzmik
Quoted 5 lines · Daniel Mack
Quoted 4 lines · Robert Jarzmik
Quoted 2 lines · Daniel Mack
When parsing the video modes from DT properties, make sure to zero out memory befor using it. This is important because not all fields in the mode
Quoted 8 lines
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines
s/befor/before/
Yeah, seen this too after sending. Should I resend, or can this be amended when applying?
I think this question is for Bartlomiej, as fbdev is his tree ...
I will fix this typo while applying, no need for resend..
Hang on. I have some more patches on top, so I'll resend this one as part of a bigger series soon.
Thanks,
Daniel