diff options
| author | Dan Carpenter <[email protected]> | 2023-11-30 07:27:15 +0000 |
|---|---|---|
| committer | Maxime Ripard <[email protected]> | 2023-11-30 09:26:11 +0000 |
| commit | 55b0f4a7c37680428d640aeada96d62888366c56 (patch) | |
| tree | 77b5137744400c1a801afbfae64b06f62f4e5e6b /drivers/gpu/drm/omapdrm/omap_gem.c | |
| parent | drm/imagination: Fix IS_ERR() vs NULL bug in pvr_request_firmware() (diff) | |
| download | kernel-55b0f4a7c37680428d640aeada96d62888366c56.tar.gz kernel-55b0f4a7c37680428d640aeada96d62888366c56.zip | |
drm/imagination: fix off by one in pvr_vm_mips_init() error handling
If the call to vmap() fails the "page_nr" is one element beyond the end
of the mips_data->pt_dma_addr[] and mips_data->pt_pages[] arrays.
The way that this is traditionally written is that we clean up the
partial loop iteration before the goto and then we can say
while (--i >= 0). At that point we know that all the elements thus
far are initialized so we don't need to have NULL checks.
Fixes: 927f3e0253c1 ("drm/imagination: Implement MIPS firmware processor and MMU support")
Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: Frank Binns <[email protected]>
Signed-off-by: Maxime Ripard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_gem.c')
0 files changed, 0 insertions, 0 deletions
