From: "KAMBAROV, ZAUR" <[email-masked]>

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 <[email-masked]>
Cc: <[email-masked]>
Signed-off-by: Andrew Morton <[email-masked]>
---

 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++) {
_