[U-Boot] [PATCH v3 01/22] Tidy up error checking and fix bug in hash command