diff options
author | Dave Airlie <airlied@redhat.com> | 2017-04-04 03:13:40 +0300 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2017-04-04 03:13:40 +0300 |
commit | 130e35e4bbceb2c04ff0ad9b1a0bcef7acc11498 (patch) | |
tree | 81767eb72aae54b1ec11f3dc5a98a2c7c36394b5 /drivers/gpu/drm/msm/msm_gem.c | |
parent | 84c4ba54f4a52f4d045c956dbc9801f27eb300b7 (diff) | |
parent | 028402d4bcfd3e99421504674cc41b0cd32768c8 (diff) | |
download | linux-130e35e4bbceb2c04ff0ad9b1a0bcef7acc11498.tar.xz |
Merge branch 'msm-fixes-4.11-rc6' of git://people.freedesktop.org/~robclark/linux into drm-fixes
misc msm fixes.
* 'msm-fixes-4.11-rc6' of git://people.freedesktop.org/~robclark/linux:
drm/msm: Make sure to detach the MMU during GPU cleanup
drm/msm/hdmi: redefinitions of macros not required
drm/msm/mdp5: Update SSPP_MAX value
drm/msm/dsi: Fix bug in dsi_mgr_phy_enable
drm/msm: Don't allow zero sized buffer objects
drm/msm: Fix wrong pointer check in a5xx_destroy
drm/msm: adreno: fix build error without debugfs
Diffstat (limited to 'drivers/gpu/drm/msm/msm_gem.c')
-rw-r--r-- | drivers/gpu/drm/msm/msm_gem.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c index 59811f29607d..68e509b3b9e4 100644 --- a/drivers/gpu/drm/msm/msm_gem.c +++ b/drivers/gpu/drm/msm/msm_gem.c @@ -812,6 +812,12 @@ struct drm_gem_object *msm_gem_new(struct drm_device *dev, size = PAGE_ALIGN(size); + /* Disallow zero sized objects as they make the underlying + * infrastructure grumpy + */ + if (size == 0) + return ERR_PTR(-EINVAL); + ret = msm_gem_new_impl(dev, size, flags, NULL, &obj); if (ret) goto fail; |