aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
diff options
context:
space:
mode:
authorMaurizio Lombardi <[email protected]>2015-11-18 14:32:44 +0000
committerMartin K. Petersen <[email protected]>2015-11-19 17:12:42 +0000
commitab08ee14393724ab52b92be643d588d41a1a05be (patch)
tree4d3f3d7c38ad4f9d178a2c15abedb84480ecdcb0 /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
parentscsi: report 'INQUIRY result too short' once per host (diff)
downloadkernel-ab08ee14393724ab52b92be643d588d41a1a05be.tar.gz
kernel-ab08ee14393724ab52b92be643d588d41a1a05be.zip
st: fix potential null pointer dereference.
If cdev_add() returns an error, the code calls cdev_del() passing the STm->cdevs[rew] pointer as parameter; the problem is that the pointer has not been initialized yet. This patch fixes the problem by moving the STm->cdevs[rew] pointer initialization before the call to cdev_add(). It also sets STm->devs[rew] and STm->cdevs[rew] to NULL in case of failure. Signed-off-by: Maurizio Lombardi <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Tomas Henzl <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
0 files changed, 0 insertions, 0 deletions