* [PATCH] video: fbdev: grvga.c: Fix for possible null pointer dereference
@ 2014-05-20 21:35 Rickard Strandqvist
2014-05-23 10:49 ` Tomi Valkeinen
0 siblings, 1 reply; 2+ messages in thread
From: Rickard Strandqvist @ 2014-05-20 21:35 UTC (permalink / raw)
To: Jean-Christophe Plagniol-Villard, Tomi Valkeinen
Cc: Rickard Strandqvist, Grant Likely, Rob Herring, Sachin Kamat,
Jingoo Han, Daniel Vetter, linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA
There is otherwise a risk of a possible null pointer dereference.
Was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist-IW2WV5XWFqGZkjO+N0TKoMugMpMbD5Xr@public.gmane.org>
---
drivers/video/fbdev/grvga.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/grvga.c b/drivers/video/fbdev/grvga.c
index c078701..2db5bb1 100644
--- a/drivers/video/fbdev/grvga.c
+++ b/drivers/video/fbdev/grvga.c
@@ -514,9 +514,10 @@ free_fb:
static int grvga_remove(struct platform_device *device)
{
struct fb_info *info = dev_get_drvdata(&device->dev);
- struct grvga_par *par = info->par;
+ struct grvga_par *par;
if (info) {
+ par = info->par;
unregister_framebuffer(info);
fb_dealloc_cmap(&info->cmap);
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] video: fbdev: grvga.c: Fix for possible null pointer dereference
2014-05-20 21:35 [PATCH] video: fbdev: grvga.c: Fix for possible null pointer dereference Rickard Strandqvist
@ 2014-05-23 10:49 ` Tomi Valkeinen
0 siblings, 0 replies; 2+ messages in thread
From: Tomi Valkeinen @ 2014-05-23 10:49 UTC (permalink / raw)
To: Rickard Strandqvist
Cc: Jean-Christophe Plagniol-Villard, Grant Likely, Rob Herring,
Sachin Kamat, Jingoo Han, Daniel Vetter, linux-fbdev,
linux-kernel, devicetree
[-- Attachment #1: Type: text/plain, Size: 1048 bytes --]
On 21/05/14 00:35, Rickard Strandqvist wrote:
> There is otherwise a risk of a possible null pointer dereference.
>
> Was largely found by using a static code analysis program called cppcheck.
>
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
> ---
> drivers/video/fbdev/grvga.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/video/fbdev/grvga.c b/drivers/video/fbdev/grvga.c
> index c078701..2db5bb1 100644
> --- a/drivers/video/fbdev/grvga.c
> +++ b/drivers/video/fbdev/grvga.c
> @@ -514,9 +514,10 @@ free_fb:
> static int grvga_remove(struct platform_device *device)
> {
> struct fb_info *info = dev_get_drvdata(&device->dev);
> - struct grvga_par *par = info->par;
> + struct grvga_par *par;
>
> if (info) {
> + par = info->par;
> unregister_framebuffer(info);
> fb_dealloc_cmap(&info->cmap);
>
Thanks, queued this and the next one (video: fbdev: s3fb.c: Fix for
possible null pointer dereference) for 3.16.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-05-23 10:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-20 21:35 [PATCH] video: fbdev: grvga.c: Fix for possible null pointer dereference Rickard Strandqvist
2014-05-23 10:49 ` Tomi Valkeinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).