[media] drxk: prevent doing something wrong when init is not ok
authorMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 29 Jun 2012 18:45:04 +0000 (15:45 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 29 Jun 2012 22:04:32 +0000 (19:04 -0300)
commit704a28e88ab6c9cfe393ae626b612cab8b46028e
tree10a368c4af41c3d66a4665458455fb9ce785848a
parent20bfe7ae089076b0af72a6d67f0298621ae90a9d
[media] drxk: prevent doing something wrong when init is not ok

If firmware is not loaded for some reason, or if it is not ready
yet, it makes no sense to honour to any DVB callbacks.

So, return -EAGAIN, as the error condition may be temporary.
If the device doesn't initialize, either because it requires a
firmware or because there's an error during init_drxk, returns
-ENODEV, to indicate such error, on all DVB callbacks.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/frontends/drxk_hard.c
drivers/media/dvb/frontends/drxk_hard.h