Hardware: Get rid of different error return codes.
Different error return code for every failure in function is pretty useless, so,
get rid of them. Now, if function exits successfully, 0 is returned. In case of
any problem, function returns -1 and prints warning log message.