mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
drm/vmwgfx: Handle vmalloc() failure in vmw_local_fifo_reserve()
If vmalloc() fails then we need to a bit of cleanup before returning.
Cc: <[email protected]>
Fixes: fb1d9738ca ("drm/vmwgfx: Add DRM driver for VMware Virtual GPU")
Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: Sinclair Yeh <[email protected]>
This commit is contained in:
parent
bbd5fefeea
commit
f0c62e9878
1 changed files with 2 additions and 0 deletions
|
|
@ -368,6 +368,8 @@ static void *vmw_local_fifo_reserve(struct vmw_private *dev_priv,
|
|||
return fifo_state->static_buffer;
|
||||
else {
|
||||
fifo_state->dynamic_buffer = vmalloc(bytes);
|
||||
if (!fifo_state->dynamic_buffer)
|
||||
goto out_err;
|
||||
return fifo_state->dynamic_buffer;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue