disp: msm: add null pointer sanity checks
Add missing null pointer checks for variables before referencing them. Change-Id: I5592ea136d2759e0a4adb288492c6ef00ae79c4d Signed-off-by: Prashant Singh <prasin@codeaurora.org>
This commit is contained in:
@@ -395,7 +395,7 @@ struct drm_framebuffer *msm_framebuffer_init(struct drm_device *dev,
|
||||
+ width * cpp
|
||||
+ mode_cmd->offsets[i];
|
||||
|
||||
if (bos[i]->size < min_size) {
|
||||
if (!bos[i] || bos[i]->size < min_size) {
|
||||
ret = -EINVAL;
|
||||
goto fail;
|
||||
}
|
||||
|
مرجع در شماره جدید
Block a user