To be consistent also factor out the hamming correct function and also safe an indention level. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>