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
Makefile -rw-r--r-- 431 bytes
auth.c -rw-r--r-- 1.9 KB
auth.h -rw-r--r-- 540 bytes
export.c -rw-r--r-- 38.9 KB
lockd.c -rw-r--r-- 1.8 KB
nfs2acl.c -rw-r--r-- 8.5 KB
nfs3acl.c -rw-r--r-- 6.4 KB
nfs3proc.c -rw-r--r-- 18.0 KB
nfs3xdr.c -rw-r--r-- 26.9 KB
nfs4acl.c -rw-r--r-- 21.7 KB
nfs4callback.c -rw-r--r-- 13.2 KB
nfs4idmap.c -rw-r--r-- 15.2 KB
nfs4proc.c -rw-r--r-- 29.8 KB
nfs4recover.c -rw-r--r-- 10.2 KB
nfs4state.c -rw-r--r-- 85.5 KB
nfs4xdr.c -rw-r--r-- 68.7 KB
nfscache.c -rw-r--r-- 7.7 KB
nfsctl.c -rw-r--r-- 20.4 KB
nfsfh.c -rw-r--r-- 15.2 KB
nfsproc.c -rw-r--r-- 15.9 KB
nfssvc.c -rw-r--r-- 13.2 KB
nfsxdr.c -rw-r--r-- 13.2 KB
stats.c -rw-r--r-- 2.8 KB
vfs.c -rw-r--r-- 49.4 KB

back to top