Instead of if conditions with line splits, use the usual error handling
pattern with a separate variable to improve readability.
The second check can use reverse logic which reduces indentation level.
No functional changes intended.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>