Don't call readline in if/else, instead setup a variable and call it once. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>