[SCSI] pm8001: potential null dereference in pm8001_dev_gone_notify()
In the original code we dereferenced "pm8001_dev" before checking if it was null. This patch moves the dereference inside the condition. This was found by a static checker (smatch). I looked, but I couldn't tell if "pm8001_dev" dev was ever actually null. The approach in this patch seemed like the safest response. Signed-off-by: NDan Carpenter <error27@gmail.com> Acked-by: NJack Wang <jack_wang@usish.com> Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
Showing
想要评论请 注册 或 登录