Browse Source

[media] drxk: Proper handle/propagate the error codes

This driver is very big and complex. An error happening in the middle
of any initialization may cause the frontend to not work. So, it
needs to properly propagate error codes internally and to userspace.

Also, printing the error codes at the places it happened helps to
discover were's a bug at the code.

Before this change, a do { } while (0) loop and lots of breaks inside
were used to propagate errors. While this works, if there are
loops inside other loops, it could be easy to forget to add another
break, causing the error to not abort the function.

Also, as not all functions were reporting errors, it is hard to
discover why something failed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab 14 years ago
parent
commit
be44eb283b
1 changed files with 433 additions and 403 deletions
  1. 433 403
      drivers/media/dvb/frontends/drxk_hard.c

File diff suppressed because it is too large
+ 433 - 403
drivers/media/dvb/frontends/drxk_hard.c


Some files were not shown because too many files changed in this diff