From bc573c5131f36339f54385c5a9f87cff7c2b693c Mon Sep 17 00:00:00 2001 From: Anton Gerasimov Date: Sat, 13 Jun 2015 22:23:53 +0300 Subject: [PATCH] staging: fbtft: eliminate code duplication Eliminated code duplication when searching for a display. Signed-off-by: Anton Gerasimov Signed-off-by: Greg Kroah-Hartman --- drivers/staging/fbtft/fbtft_device.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/fbtft/fbtft_device.c b/drivers/staging/fbtft/fbtft_device.c index e5aa533..211d504 100644 --- a/drivers/staging/fbtft/fbtft_device.c +++ b/drivers/staging/fbtft/fbtft_device.c @@ -1421,8 +1421,6 @@ static int __init fbtft_device_init(void) ": failed to register SPI device\n"); return ret; } - found = true; - break; } else { ret = platform_device_register(p_device); if (ret < 0) { @@ -1431,9 +1429,9 @@ static int __init fbtft_device_init(void) ret); return ret; } - found = true; - break; } + found = true; + break; } } -- 2.7.4