Eliminated code duplication when searching for a display. Signed-off-by: Anton Gerasimov <anton.gerasimov@xxxxxxxxxxxxxxx> --- 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; } } -- 1.8.4.5 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel