upstream: [media] tlg2300: fix checking firmware in poseidon_probe()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Mon, 24 Jun 2013 18:57:37 +0000 (15:57 -0300)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:51:28 +0000 (11:51 +0900)
commitbb1a2966f468bafd566989546188ac2c89e56971
tree7461e84ebc806e76df7c27e583ec66f8595559d4
parentdb0ce476969fff8c5b9276bd3d393217ee7eeaf4
upstream: [media] tlg2300: fix checking firmware in poseidon_probe()

check_firmware() makes sure firmware is in a device.
It returns zero on success and error code otherwise.
Also it sets down_firmware flag to 1 if downloading occurs.
The only caller poseidon_probe() checks down_firmware flag and
returns 0 without any initialization if it is set.
That looks very strange, so the patch removes down_firmware argument
of check_firmware() and returns error code if check_firmware() fails
in poseidon_probe().
Not tested on real hardware.
Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/usb/tlg2300/pd-main.c