Commit a81114d0 authored by Ard Biesheuvel's avatar Ard Biesheuvel Committed by Jean Delvare

firmware: dmi: handle missing DMI data gracefully

Currently, when booting a kernel with DMI support on a platform that has
no DMI tables, the following output is emitted into the kernel log:

  [    0.128818] DMI not present or invalid.
  ...
  [    1.306659] dmi: Firmware registration failed.
  ...
  [    2.908681] dmi-sysfs: dmi entry is absent.

The first one is a pr_info(), but the subsequent ones are pr_err()s that
complain about a condition that is not really an error to begin with.

So let's clean this up, and give up silently if dma_available is not set.
Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: default avatarMartin Hundebøll <mnhu@prevas.dk>
Signed-off-by: default avatarJean Delvare <jdelvare@suse.de>
parent a7770ae1
......@@ -652,7 +652,7 @@ static int __init dmi_sysfs_init(void)
int val;
if (!dmi_kobj) {
pr_err("dmi-sysfs: dmi entry is absent.\n");
pr_debug("dmi-sysfs: dmi entry is absent.\n");
error = -ENODATA;
goto err;
}
......
......@@ -704,10 +704,8 @@ static int __init dmi_init(void)
u8 *dmi_table;
int ret = -ENOMEM;
if (!dmi_available) {
ret = -ENODATA;
goto err;
}
if (!dmi_available)
return 0;
/*
* Set up dmi directory at /sys/firmware/dmi. This entry should stay
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment