Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 783aa8fa authored by Akinobu Mita's avatar Akinobu Mita Committed by Mauro Carvalho Chehab
Browse files

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: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: default avatarAntoine Jacquet <royale@zerezo.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 1b9d313c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment