Commit b0e7ae6c authored by Mike Anderson's avatar Mike Anderson Committed by James Bottomley

[PATCH] fix Kernel Panic in scsi_host_dev_release

If a driver calls scsi_register, but then has a problem in there
detect where they need to call scsi_unregister the parent pointer of
the struct device may never be set.

 drivers/scsi/hosts.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)
parent a0cb8f17
......@@ -158,6 +158,7 @@ static void scsi_host_dev_release(struct device *dev)
scsi_proc_hostdir_rm(shost->hostt);
scsi_destroy_command_freelist(shost);
if (parent)
put_device(parent);
kfree(shost);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment