diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-11 20:52:16 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-11 20:52:16 +0000 |
commit | dabbb6b1c9d6df38c1f140b22303c9e8935bbc38 (patch) | |
tree | fa04f6cebfea98f39e19001c553d66e7b4338a70 /linux/drivers/media/video/cpia.h | |
parent | f9bf244a99c60bc5c062682e996582f3ed109bad (diff) | |
download | mediapointer-dvb-s2-dabbb6b1c9d6df38c1f140b22303c9e8935bbc38.tar.gz mediapointer-dvb-s2-dabbb6b1c9d6df38c1f140b22303c9e8935bbc38.tar.bz2 |
ov7670: clean up ov7670_read semantics
From: Andres Salomon <dilinger@queued.net>
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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/cpia.h')
0 files changed, 0 insertions, 0 deletions