]> git.baikalelectronics.ru Git - kernel.git/commit
[media] ds3000: bail out early on i2c failures during firmware load
authorRémi Cardona <remi.cardona@smartjog.com>
Fri, 28 Sep 2012 11:59:29 +0000 (08:59 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 27 Dec 2012 21:43:46 +0000 (19:43 -0200)
commit34e4c86190cdd96daa194458c50c8248d6ad698a
treef106b7164df7cb6bfbb5c4dc1feeb946e2f6a82b
parent6e7cb6e50a3963bfdff69925d22d9173b49aa92c
[media] ds3000: bail out early on i2c failures during firmware load

- if kmalloc() returns NULL, we can return immediately without trying
   to kfree() a NULL pointer.
 - if i2c_transfer() fails, error out immediately instead of trying to
   upload the remaining bytes of the firmware.
 - the error code is then properly propagated down to ds3000_initfe().

Signed-off-by: Rémi Cardona <remi.cardona@smartjog.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb-frontends/ds3000.c