diff options
| author | Colin Ian King <[email protected]> | 2017-07-06 15:06:32 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2017-07-17 11:11:57 +0000 |
| commit | 446230f52a5bef593554510302465eabab45a372 (patch) | |
| tree | 77ae0ac884bb89ddb91c43d44808b4af44f4e4f4 /drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | |
| parent | usb: typec: include linux/device.h in ucsi.h (diff) | |
| download | kernel-446230f52a5bef593554510302465eabab45a372.tar.gz kernel-446230f52a5bef593554510302465eabab45a372.zip | |
usb: storage: return on error to avoid a null pointer dereference
When us->extra is null the driver is not initialized, however, a
later call to osd200_scsi_to_ata is made that dereferences
us->extra, causing a null pointer dereference. The code
currently detects and reports that the driver is not initialized;
add a return to avoid the subsequent dereference issue in this
check.
Thanks to Alan Stern for pointing out that srb->result needs setting
to DID_ERROR << 16
Detected by CoverityScan, CID#100308 ("Dereference after null check")
Signed-off-by: Colin Ian King <[email protected]>
Cc: stable <[email protected]>
Acked-by: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c')
0 files changed, 0 insertions, 0 deletions
