[SCSI] scsi_lib: fix potential NULL dereference
Stanse found a potential NULL dereference in scsi_kill_request. Instead of triggering BUG() in 'if (unlikely(cmd == NULL))' branch, the kernel will Oops earlier on cmd dereference. Move the dereferences after the if. Signed-off-by: NJiri Slaby <jirislaby@gmail.com> Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
Showing
想要评论请 注册 或 登录