From: Akinobu Mita Date: Sun, 20 May 2007 12:12:10 +0000 (-0300) Subject: V4L/DVB (5678): Zr364xx: fix return values X-Git-Tag: v2.6.23-rc1~493^2~99 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=783aa8fa1fe666a039edb784d9458647da97d28a;p=pandora-kernel.git V4L/DVB (5678): Zr364xx: fix return values This patch fixes several return value related problems in zr364xx. - return -ENOMEM instead of -ENODEV on out of memory - zr364xx checks video_register_device() error only when its return value is -1. But video_register_device() doesn't always return -1 on error. - If usb_register() returns error, module_init() wrongly returns 1: retval = usb_register(&zr364xx_driver) < 0; ... return retval; And it allows the module to be loaded. Because sys_init_module() doesn't see positive return value as error. Signed-off-by: Akinobu Mita Signed-off-by: Antoine Jacquet Signed-off-by: Mauro Carvalho Chehab --- Reading git-diff-tree failed