mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
firmware: coreboot: Fix CFR error-pointer handling warning
The scoped kfree cleanup already ignores error pointers, so passing the
pointer through no_free_ptr() before PTR_ERR() is unnecessary. It also
makes the IS_ERR/PTR_ERR expressions appear inconsistent to Coccinelle.
Return PTR_ERR() directly. The scoped cleanup still leaves error pointers
untouched while freeing successful allocations on later returns.
Fixes: f2e05ce976 ("firmware: coreboot: Add CFR firmware attributes driver")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202610210637.LiJ3U0ob-lkp@intel.com/
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Link: https://lore.kernel.org/r/CABtds-16eUH6ah3Rr9R=N2605TPdFgDekM5oXVeWqGcmYfWqag@mail.gmail.com
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
This commit is contained in:
parent
e094fd05de
commit
2433db2af8
|
|
@ -341,7 +341,7 @@ static int coreboot_cfr_read_value(const struct coreboot_cfr_setting *setting,
|
|||
int ret;
|
||||
|
||||
if (IS_ERR(efi_name))
|
||||
return PTR_ERR(no_free_ptr(efi_name));
|
||||
return PTR_ERR(efi_name);
|
||||
|
||||
ret = efivar_lock();
|
||||
if (ret)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user