Em Sun, 31 May 2009 14:41:52 +0800
"Figo.zhang" <[email protected]> escreveu:

> video_register_device() return zero on success, it would not return a 
> positive integer.
> 
> Signed-off-by: Figo.zhang <[email protected]>
> --- 
>  drivers/media/video/ov511.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/media/video/ov511.c b/drivers/media/video/ov511.c
> index 9af5532..816427e 100644
> --- a/drivers/media/video/ov511.c
> +++ b/drivers/media/video/ov511.c
> @@ -5851,7 +5851,7 @@ ov51x_probe(struct usb_interface *intf, const struct 
> usb_device_id *id)
>                       break;
>  
>               if (video_register_device(ov->vdev, VFL_TYPE_GRABBER,
> -                     unit_video[i]) >= 0) {
> +                     unit_video[i]) == 0) {
>                       break;
>               }
>       }

Nack.

Errors are always negative. So, any zero or positive value indicates that no 
error occurred.

Yet, the logic for forcing ov51x to specific minor number seems broken: it will
end by registering the device twice, if used.

So, that part of the function needs a rewrite. I'll fix it.

-- 

Cheers,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to