Improve error handling in the following ways:
- set return value on error condition to an appropriate error code
- return error code immediately in case of an error (slightly changes
code structure)
- pass up real error code
- add missing error handling
- return 0 when error have been caught already
- put device back in active mode after error occurs
Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>