diff options
author | Russ Weight <[email protected]> | 2022-09-16 16:52:05 -0700 |
---|---|---|
committer | Xu Yilun <[email protected]> | 2022-09-19 12:58:19 +0800 |
commit | 468c9d928a8f38fdfaa61b05e81473cc7c8a6461 (patch) | |
tree | 30b029aeee697f8fd140e90c3d28a1c021ea9340 /drivers/gpu/drm/amd/display/modules/inc/mod_shared.h | |
parent | 568035b01cfb107af8d2e4bd2fb9aea22cf5b868 (diff) |
fpga: m10bmc-sec: Fix possible memory leak of flash_buf
There is an error check following the allocation of flash_buf that returns
without freeing flash_buf. It makes more sense to do the error check
before the allocation and the reordering eliminates the memory leak.
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Fixes: 154afa5c31cd ("fpga: m10bmc-sec: expose max10 flash update count")
Signed-off-by: Russ Weight <[email protected]>
Reviewed-by: Tom Rix <[email protected]>
Acked-by: Xu Yilun <[email protected]>
Cc: <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Xu Yilun <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/display/modules/inc/mod_shared.h')
0 files changed, 0 insertions, 0 deletions