Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bc573c51 authored by Anton Gerasimov's avatar Anton Gerasimov Committed by Greg Kroah-Hartman
Browse files

staging: fbtft: eliminate code duplication



Eliminated code duplication when searching for a display.

Signed-off-by: default avatarAnton Gerasimov <anton.gerasimov@openmailbox.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8e56b955
Loading
Loading
Loading
Loading
+2 −4
Original line number Original line Diff line number Diff line
@@ -1421,8 +1421,6 @@ static int __init fbtft_device_init(void)
						": failed to register SPI device\n");
						": failed to register SPI device\n");
					return ret;
					return ret;
				}
				}
				found = true;
				break;
			} else {
			} else {
				ret = platform_device_register(p_device);
				ret = platform_device_register(p_device);
				if (ret < 0) {
				if (ret < 0) {
@@ -1431,11 +1429,11 @@ static int __init fbtft_device_init(void)
						ret);
						ret);
					return ret;
					return ret;
				}
				}
			}
			found = true;
			found = true;
			break;
			break;
		}
		}
	}
	}
	}


	if (!found) {
	if (!found) {
		pr_err(DRVNAME":  display not supported: '%s'\n", name);
		pr_err(DRVNAME":  display not supported: '%s'\n", name);