tree 306857acc1009e7d354aea71aa02a0ea5d40fefd
parent 5bbcfd9000887c0da7d57cc7b3ac869fc0dd5aa9
author KAMBAROV, ZAUR <[EMAIL PROTECTED]> Fri, 08 Jul 2005 07:57:05 -0700
committer Linus Torvalds <[EMAIL PROTECTED]> Fri, 08 Jul 2005 08:23:47 -0700
[PATCH] coverity: fix fbsysfs null pointer check
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 PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
drivers/video/fbsysfs.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbsysfs.c b/drivers/video/fbsysfs.c
--- a/drivers/video/fbsysfs.c
+++ b/drivers/video/fbsysfs.c
@@ -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++) {
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html