summaryrefslogtreecommitdiffstats
path: root/drivers/video/efi_gop.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/efi_gop.c')
-rw-r--r--drivers/video/efi_gop.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/video/efi_gop.c b/drivers/video/efi_gop.c
index 52387f30dc..5e9bc406e1 100644
--- a/drivers/video/efi_gop.c
+++ b/drivers/video/efi_gop.c
@@ -238,11 +238,23 @@ static int efi_gop_probe(struct efi_device *efidev)
priv->fb.current_mode = priv->mode;
ret = register_framebuffer(&priv->fb);
- if (!ret) {
- priv->dev->priv = &priv->fb;
- return 0;
+ if (ret)
+ goto free_modes;
+
+ priv->dev->priv = &priv->fb;
+
+ if (IS_ENABLED(CONFIG_FRAMEBUFFER_CONSOLE)) {
+ struct console_device *cdev;
+
+ cdev = console_get_by_dev(&priv->fb.dev);
+ if (cdev)
+ dev_add_param_fixed(&cdev->class_dev, "linux.bootargs.earlycon",
+ "earlycon=efifb");
}
+ return 0;
+
+free_modes:
if (priv->fb.modes.modes) {
int i;