Message ID | 201007202219.o6KMJXVC021003@imap1.linux-foundation.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff -puN drivers/platform/x86/acerhdf.c~acerhdf-driver-didnt-verify-the-pointers-in-which-it-got-product-information drivers/platform/x86/acerhdf.c --- a/drivers/platform/x86/acerhdf.c~acerhdf-driver-didnt-verify-the-pointers-in-which-it-got-product-information +++ a/drivers/platform/x86/acerhdf.c @@ -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);