upstream: [media] sta2x11_vip: fix error return code in sta2x11_vip_init_one()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Mon, 13 May 2013 13:00:01 +0000 (10:00 -0300)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:48:01 +0000 (11:48 +0900)
commitae79ac752bb7751a98a3a8a7d836af010cfb9c9a
treeeb4e42b992b38a4b7993feea243dc718371ff292
parent14659ea0e85d68fecf934f05ab27d84fb9b734a1
upstream: [media] sta2x11_vip: fix error return code in sta2x11_vip_init_one()

The orig code will release all the resources if v4l2_device_register()
failed and return 0. But what we need in this case is to return an
negative error code to let the caller known we are failed.
So the patch save the return value of v4l2_device_register() to 'ret'
and return it when error.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/pci/sta2x11/sta2x11_vip.c