chrome platform firmware changes for 6.8

* Fixes
 
   - Fix an invalid address access.
 
 * Misc
 
   - Use .remove_new() for converting the callback to return void.
 -----BEGIN PGP SIGNATURE-----
 
 iIkEABYIADEWIQS0yQeDP3cjLyifNRUrxTEGBto89AUCZZu2NhMcdHp1bmdiaUBr
 ZXJuZWwub3JnAAoJECvFMQYG2jz0568A/2e7mfbrbOecSIJp+VFNnjg5sUJHKeKR
 qLMrQ2bW3N4bAQC6kb8hBi5bBjDu8qE/ivXn9MbKoXAdZ+gbWdGsSWD6DA==
 =ZOhl
 -----END PGP SIGNATURE-----

Merge tag 'tag-chrome-platform-firmware-for-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux

Pull chrome platform firmware updates from Tzung-Bi Shih:

  - Fix an invalid address access.

  - Use .remove_new() for converting the callback to return void

* tag 'tag-chrome-platform-firmware-for-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux:
  firmware: coreboot: Convert to platform remove callback returning void
  firmware: coreboot: framebuffer: Avoid invalid zero physical address
This commit is contained in:
Linus Torvalds 2024-01-09 17:04:44 -08:00
commit b9b56eb280
2 changed files with 5 additions and 3 deletions

View file

@ -176,10 +176,9 @@ static int __cb_dev_unregister(struct device *dev, void *dummy)
return 0;
}
static int coreboot_table_remove(struct platform_device *pdev)
static void coreboot_table_remove(struct platform_device *pdev)
{
bus_for_each_dev(&coreboot_bus_type, NULL, NULL, __cb_dev_unregister);
return 0;
}
#ifdef CONFIG_ACPI
@ -201,7 +200,7 @@ MODULE_DEVICE_TABLE(of, coreboot_of_match);
static struct platform_driver coreboot_table_driver = {
.probe = coreboot_table_probe,
.remove = coreboot_table_remove,
.remove_new = coreboot_table_remove,
.driver = {
.name = "coreboot_table",
.acpi_match_table = ACPI_PTR(cros_coreboot_acpi_match),

View file

@ -36,6 +36,9 @@ static int framebuffer_probe(struct coreboot_device *dev)
.format = NULL,
};
if (!fb->physical_address)
return -ENODEV;
for (i = 0; i < ARRAY_SIZE(formats); ++i) {
if (fb->bits_per_pixel == formats[i].bits_per_pixel &&
fb->red_mask_pos == formats[i].red.offset &&