We need the bch correct algorithm in the next patches, so factor out a seperate function for this and also safe an indention level. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>