summaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-06-14 12:40:36 +0200
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2017-06-14 12:40:36 +0200
commitc544ad18bd47ee989eb433f09b6574a7f6d415c7 (patch)
treedaac969d4530c982f409b449d9f924edb27d94c1 /drivers/video
parentLinux 4.12-rc5 (diff)
downloadlinux-c544ad18bd47ee989eb433f09b6574a7f6d415c7.tar.xz
linux-c544ad18bd47ee989eb433f09b6574a7f6d415c7.zip
video: fbdev: avoid int-in-bool-context warning
gcc-7 suspects this code might be wrong because we use the result of a multiplication as a bool: drivers/video/fbdev/core/fbmon.c: In function 'fb_edid_add_monspecs': drivers/video/fbdev/core/fbmon.c:1051:84: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context] It's actually fine, so let's add a comparison to zero to make that clear to the compiler too. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/core/fbmon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/fbdev/core/fbmon.c b/drivers/video/fbdev/core/fbmon.c
index 687ebb053438..41d7979d81c5 100644
--- a/drivers/video/fbdev/core/fbmon.c
+++ b/drivers/video/fbdev/core/fbmon.c
@@ -1048,7 +1048,7 @@ void fb_edid_add_monspecs(unsigned char *edid, struct fb_monspecs *specs)
for (i = 0; i < (128 - edid[2]) / DETAILED_TIMING_DESCRIPTION_SIZE;
i++, block += DETAILED_TIMING_DESCRIPTION_SIZE)
- if (PIXEL_CLOCK)
+ if (PIXEL_CLOCK != 0)
edt[num++] = block - edid;
/* Yikes, EDID data is totally useless */