Revision bca5c2c550f16d2dc2d21ffb7b4712bd0a7d32a9 authored by Andres Salomon on 12 July 2008, 20:47:54 UTC, committed by Linus Torvalds on 12 July 2008, 21:33:41 UTC
Cortland Setlow pointed out a bug in ov7670.c where the result from
ov7670_read() was just being checked for !0, rather than <0.  This made me
realize that ov7670_read's semantics were rather confusing; it both fills
in 'value' with the result, and returns it.  This is goes against general
kernel convention; so rather than fixing callers, let's fix the function.

This makes ov7670_read return <0 in the case of an error, and 0 upon
success. Thus, code like:

res = ov7670_read(...);
if (!res)
	goto error;

..will work properly.

Signed-off-by: Cortland Setlow <csetlow@tower-research.com>
Signed-off-by: Andres Salomon <dilinger@debian.org>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 05d81d2
History
File Mode Size
Kconfig -rw-r--r-- 8.9 KB
Makefile -rw-r--r-- 620 bytes
acorn.c -rw-r--r-- 12.2 KB
acorn.h -rw-r--r-- 623 bytes
amiga.c -rw-r--r-- 3.4 KB
amiga.h -rw-r--r-- 116 bytes
atari.c -rw-r--r-- 3.8 KB
atari.h -rw-r--r-- 1.1 KB
check.c -rw-r--r-- 12.7 KB
check.h -rw-r--r-- 571 bytes
efi.c -rw-r--r-- 19.3 KB
efi.h -rw-r--r-- 4.2 KB
ibm.c -rw-r--r-- 5.1 KB
ibm.h -rw-r--r-- 70 bytes
karma.c -rw-r--r-- 1.1 KB
karma.h -rw-r--r-- 151 bytes
ldm.c -rw-r--r-- 43.2 KB
ldm.h -rw-r--r-- 5.7 KB
mac.c -rw-r--r-- 3.2 KB
mac.h -rw-r--r-- 1.3 KB
msdos.c -rw-r--r-- 14.2 KB
msdos.h -rw-r--r-- 151 bytes
osf.c -rw-r--r-- 1.7 KB
osf.h -rw-r--r-- 150 bytes
sgi.c -rw-r--r-- 2.2 KB
sgi.h -rw-r--r-- 155 bytes
sun.c -rw-r--r-- 3.8 KB
sun.h -rw-r--r-- 196 bytes
sysv68.c -rw-r--r-- 1.8 KB
sysv68.h -rw-r--r-- 89 bytes
ultrix.c -rw-r--r-- 1.2 KB
ultrix.h -rw-r--r-- 117 bytes

back to top