Thread (2 messages) 2 messages, 2 authors, 2005-07-01

coverity-fbsysfs-fix-null-pointer-check.patch added to -mm tree

From: <hidden>
Date: 2005-07-01 05:53:44

The patch titled

     coverity: fix fbsysfs null pointer check

has been added to the -mm tree.  Its filename is

     coverity-fbsysfs-fix-null-pointer-check.patch

Patches currently in -mm which might be from kambarov@berkeley.edu are

coverity-fbsysfs-fix-null-pointer-check.patch



From: "KAMBAROV, ZAUR" <redacted>

Correctly test for a null pointer before going and dereferencing it.

This defect was found automatically by Coverity Prevent, a static analysis
tool.

Signed-off-by: Zaur Kambarov <redacted>
Cc: <redacted>
Signed-off-by: Andrew Morton <redacted>
---

 drivers/video/fbsysfs.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/video/fbsysfs.c~coverity-fbsysfs-fix-null-pointer-check drivers/video/fbsysfs.c
--- devel/drivers/video/fbsysfs.c~coverity-fbsysfs-fix-null-pointer-check	2005-06-30 22:52:31.000000000 -0700
+++ devel-akpm/drivers/video/fbsysfs.c	2005-06-30 22:52:31.000000000 -0700
@@ -256,7 +256,7 @@ static ssize_t show_cmap(struct class_de
 	unsigned int offset = 0, i;
 
 	if (!fb_info->cmap.red || !fb_info->cmap.blue ||
-	    fb_info->cmap.green || fb_info->cmap.transp)
+	    !fb_info->cmap.green || !fb_info->cmap.transp)
 		return -EINVAL;
 
 	for (i = 0; i < fb_info->cmap.len; i++) {
_


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help