if (table->length < sizeof(bgrt_tab)) {
pr_notice("Ignoring BGRT: invalid length %u (expected %zu)\n",
table->length, sizeof(bgrt_tab)); return;
}
*bgrt = *(struct acpi_table_bgrt *)table; /* * Only version 1 is defined but some older laptops (seen on Lenovo * Ivy Bridge models) have a correct version 1 BGRT table with the * version set to 0, so we accept version 0 and 1.
*/ if (bgrt->version > 1) {
pr_notice("Ignoring BGRT: invalid version %u (expected 1)\n",
bgrt->version); goto out;
} if (bgrt->image_type != 0) {
pr_notice("Ignoring BGRT: invalid image type %u (expected 0)\n",
bgrt->image_type); goto out;
} if (!bgrt->image_address) {
pr_notice("Ignoring BGRT: null image address\n"); goto out;
}