Skip to content
Commit 5e4009ba authored by Jeff Garzik's avatar Jeff Garzik Committed by James Bottomley
Browse files

[SCSI] SCSI sd: fix module init/exit error handling



- Properly handle and unwind errors in init_sd().  Fixes leaks on error,
  if class_register() or scsi_register_driver() failed.

- Ensure that exit_sd() execution order is the perfect inverse of
  initialization order.

FIXME:  If some-but-not-all register_blkdev() calls fail, we wind up
calling unregister_blkdev() for block devices we did not register.
This was a pre-existing bug.

Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 37e0333c
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