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
9p
adfs
affs
afs
autofs
autofs4
befs
bfs
cifs
coda
configfs
cramfs
debugfs
devpts
dlm
ecryptfs
efs
exportfs
ext2
ext3
ext4
fat
freevxfs
fuse
gfs2
hfs
hfsplus
hostfs
hpfs
hppfs
hugetlbfs
isofs
jbd
jbd2
jffs2
jfs
lockd
minix
msdos
ncpfs
nfs
nfs_common
nfsd
nls
ntfs
ocfs2
openpromfs
partitions
proc
qnx4
ramfs
reiserfs
romfs
smbfs
sysfs
sysv
udf
ufs
vfat
xfs
Kconfig -rw-r--r-- 77.0 KB
Kconfig.binfmt -rw-r--r-- 5.4 KB
Makefile -rw-r--r-- 3.8 KB
aio.c -rw-r--r-- 45.9 KB
anon_inodes.c -rw-r--r-- 4.9 KB
attr.c -rw-r--r-- 4.7 KB
bad_inode.c -rw-r--r-- 8.1 KB
binfmt_aout.c -rw-r--r-- 14.8 KB
binfmt_elf.c -rw-r--r-- 53.2 KB
binfmt_elf_fdpic.c -rw-r--r-- 47.6 KB
binfmt_em86.c -rw-r--r-- 2.8 KB
binfmt_flat.c -rw-r--r-- 26.6 KB
binfmt_misc.c -rw-r--r-- 15.3 KB
binfmt_script.c -rw-r--r-- 2.7 KB
binfmt_som.c -rw-r--r-- 7.6 KB
bio.c -rw-r--r-- 31.9 KB
block_dev.c -rw-r--r-- 30.6 KB
buffer.c -rw-r--r-- 86.4 KB
char_dev.c -rw-r--r-- 13.1 KB
compat.c -rw-r--r-- 53.0 KB
compat_binfmt_elf.c -rw-r--r-- 3.4 KB
compat_ioctl.c -rw-r--r-- 84.3 KB
dcache.c -rw-r--r-- 56.2 KB
dcookies.c -rw-r--r-- 6.3 KB
direct-io.c -rw-r--r-- 34.2 KB
dnotify.c -rw-r--r-- 4.6 KB
dquot.c -rw-r--r-- 58.3 KB
drop_caches.c -rw-r--r-- 1.6 KB
eventfd.c -rw-r--r-- 5.0 KB
eventpoll.c -rw-r--r-- 35.9 KB
exec.c -rw-r--r-- 40.5 KB
fcntl.c -rw-r--r-- 14.0 KB
fifo.c -rw-r--r-- 3.1 KB
file.c -rw-r--r-- 10.7 KB
file_table.c -rw-r--r-- 9.8 KB
filesystems.c -rw-r--r-- 5.5 KB
fs-writeback.c -rw-r--r-- 22.3 KB
generic_acl.c -rw-r--r-- 4.2 KB
inode.c -rw-r--r-- 37.7 KB
inotify.c -rw-r--r-- 20.2 KB
inotify_user.c -rw-r--r-- 18.2 KB
internal.h -rw-r--r-- 1.4 KB
ioctl.c -rw-r--r-- 4.5 KB
ioprio.c -rw-r--r-- 5.0 KB
libfs.c -rw-r--r-- 21.0 KB
locks.c -rw-r--r-- 57.6 KB
mbcache.c -rw-r--r-- 18.3 KB
mpage.c -rw-r--r-- 19.9 KB
namei.c -rw-r--r-- 72.9 KB
namespace.c -rw-r--r-- 58.9 KB
nfsctl.c -rw-r--r-- 2.4 KB
no-block.c -rw-r--r-- 663 bytes
open.c -rw-r--r-- 27.9 KB
pipe.c -rw-r--r-- 24.7 KB
pnode.c -rw-r--r-- 8.9 KB
pnode.h -rw-r--r-- 1.1 KB
posix_acl.c -rw-r--r-- 8.5 KB
quota.c -rw-r--r-- 12.1 KB
quota_v1.c -rw-r--r-- 5.8 KB
quota_v2.c -rw-r--r-- 20.2 KB
read_write.c -rw-r--r-- 17.6 KB
read_write.h -rw-r--r-- 542 bytes
readdir.c -rw-r--r-- 6.8 KB
select.c -rw-r--r-- 20.8 KB
seq_file.c -rw-r--r-- 12.2 KB
signalfd.c -rw-r--r-- 6.7 KB
splice.c -rw-r--r-- 39.5 KB
stack.c -rw-r--r-- 1.1 KB
stat.c -rw-r--r-- 10.6 KB
super.c -rw-r--r-- 22.8 KB
sync.c -rw-r--r-- 7.0 KB
timerfd.c -rw-r--r-- 6.6 KB
utimes.c -rw-r--r-- 5.5 KB
xattr.c -rw-r--r-- 15.0 KB
xattr_acl.c -rw-r--r-- 2.3 KB

back to top