]> git.baikalelectronics.ru Git - kernel.git/commit
video/sis/: fix negative array index
authorAdrian Bunk <bunk@kernel.org>
Thu, 15 Nov 2007 00:59:02 +0000 (16:59 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 15 Nov 2007 02:45:38 +0000 (18:45 -0800)
commitd5d60a3b2a54bccc1c900f69ef9d4a027d8de48c
tree889d05f1bcee8050500274f6ce695d038ee8c744
parent1db4f6d0726844f00dc6f13f63a9ff503df1757b
video/sis/: fix negative array index

This patch fixes the possible usage of a negative value as an array
index spotted by the Coverity checker.

sisfb_validate_mode() could return a negative error code and we must check for
that prior to using its return value as an array index.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/video/sis/sis_main.c