[patch] drm/amdgpu: potential NULL dereference on error

2015-06-11 Thread Dan Carpenter
On Thu, Jun 11, 2015 at 04:35:26PM +0200, walter harms wrote: > You still have to check 2 types of error return here. > I simply do not understand why ebugfs_create_file() does not return -ENOMEM > (or returns NULL on any error). To be honest, I don't know why debugfs_create_file() doesn't just re

[patch] drm/amdgpu: potential NULL dereference on error

2015-06-11 Thread walter harms
Am 11.06.2015 14:20, schrieb Dan Carpenter: > On Thu, Jun 11, 2015 at 02:03:18PM +0200, walter harms wrote: >> >> >> Am 11.06.2015 10:49, schrieb Dan Carpenter: >>> debugfs_create_file() can return an error pointer if debugfs is disabled >>> or it can return NULL on error. >>> >>> Signed-off-by:

[patch] drm/amdgpu: potential NULL dereference on error

2015-06-11 Thread Dan Carpenter
On Thu, Jun 11, 2015 at 02:03:18PM +0200, walter harms wrote: > > > Am 11.06.2015 10:49, schrieb Dan Carpenter: > > debugfs_create_file() can return an error pointer if debugfs is disabled > > or it can return NULL on error. > > > > Signed-off-by: Dan Carpenter > > > > diff --git a/drivers/gpu

[patch] drm/amdgpu: potential NULL dereference on error

2015-06-11 Thread walter harms
Am 11.06.2015 10:49, schrieb Dan Carpenter: > debugfs_create_file() can return an error pointer if debugfs is disabled > or it can return NULL on error. > > Signed-off-by: Dan Carpenter > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

[patch] drm/amdgpu: potential NULL dereference on error

2015-06-11 Thread Dan Carpenter
debugfs_create_file() can return an error pointer if debugfs is disabled or it can return NULL on error. Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 36be03c..adba2a1 100644 --- a/drivers/gpu/drm/amd/amdg