Commit 5cf4c07a authored by Rahul Chaturvedi's avatar Rahul Chaturvedi Committed by Matthew Garrett

acerhdf: driver didn't verify the pointers in which it got product information

Driver didn't verify the pointers in which it got product information back
from DMI; on QEMU one of the pointers came back null, which made the
driver crash and subsequently caused a kernel panic.
Signed-off-by: default avatarRahul Chaturvedi <rkc@chromium.org>
Signed-off-by: default avatarPeter Feuerer <peter@piie.net>
Cc: Borislav Petkov <petkovbb@gmail.com>
Cc: Andreas Mohr <andi@lisas.de>
Cc: Len Brown <lenb@kernel.org>
Cc: Matthew Garrett <mjg@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
parent 210183d4
......@@ -524,6 +524,10 @@ static int acerhdf_check_hardware(void)
version = dmi_get_system_info(DMI_BIOS_VERSION);
product = dmi_get_system_info(DMI_PRODUCT_NAME);
if (!vendor || !version || !product) {
pr_err("error getting hardware information\n");
return -EINVAL;
}
pr_info("Acer Aspire One Fan driver, v.%s\n", DRV_VER);
......
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