Hi Samuel,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on drm/drm-next]
[also build test WARNING on v4.15-rc7 next-20180110]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:    
https://github.com/0day-ci/linux/commits/Samuel-Li/drm-amdgpu-allow-framebuffer-in-GART-memory-as-well/20180106-050432
base:   git://people.freedesktop.org/~airlied/linux.git drm-next

smatch warnings:
drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c:226 amdgpu_gem_prime_export() error: 
'buf' dereferencing possible ERR_PTR()

# 
https://github.com/0day-ci/linux/commit/6aa2afecb5a3efc463d200023839399571404843
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 6aa2afecb5a3efc463d200023839399571404843
vim +/buf +226 drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c

6aa2afecb5 Samuel Li       2018-01-04  211  
d38ceaf99e Alex Deucher    2015-04-20  212  struct dma_buf 
*amdgpu_gem_prime_export(struct drm_device *dev,
d38ceaf99e Alex Deucher    2015-04-20  213                                      
struct drm_gem_object *gobj,
d38ceaf99e Alex Deucher    2015-04-20  214                                      
int flags)
d38ceaf99e Alex Deucher    2015-04-20  215  {
d38ceaf99e Alex Deucher    2015-04-20  216      struct amdgpu_bo *bo = 
gem_to_amdgpu_bo(gobj);
4b277247b1 Christian König 2017-11-13  217      struct dma_buf *buf;
d38ceaf99e Alex Deucher    2015-04-20  218  
e1eb899b45 Christian König 2017-08-25  219      if 
(amdgpu_ttm_tt_get_usermm(bo->tbo.ttm) ||
e1eb899b45 Christian König 2017-08-25  220          bo->flags & 
AMDGPU_GEM_CREATE_VM_ALWAYS_VALID)
d38ceaf99e Alex Deucher    2015-04-20  221              return ERR_PTR(-EPERM);
d38ceaf99e Alex Deucher    2015-04-20  222  
4b277247b1 Christian König 2017-11-13  223      buf = drm_gem_prime_export(dev, 
gobj, flags);
4b277247b1 Christian König 2017-11-13  224      if (!IS_ERR(buf))
4b277247b1 Christian König 2017-11-13  225              buf->file->f_mapping = 
dev->anon_inode->i_mapping;
6aa2afecb5 Samuel Li       2018-01-04 @226      buf->ops = &amdgpu_dmabuf_ops;
6aa2afecb5 Samuel Li       2018-01-04  227  
4b277247b1 Christian König 2017-11-13  228      return buf;
d38ceaf99e Alex Deucher    2015-04-20  229  }
6aa2afecb5 Samuel Li       2018-01-04  230  

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to