]> git.karo-electronics.de Git - karo-tx-linux.git/commit
SCSI: fc class: fix fc_transport_init error handling
authorMike Christie <michaelc@cs.wisc.edu>
Wed, 18 Nov 2009 03:25:16 +0000 (21:25 -0600)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 6 Jan 2010 22:26:30 +0000 (14:26 -0800)
commitfc480c27d9d5b2be5da93de8169d040f8a082f71
tree7f2c695941f1ceefc5cab1d4da64a4d5e4c9292b
parent14e3cd129aad425dae38ac5ba9aa7d709283a085
SCSI: fc class: fix fc_transport_init error handling

commit 48de68a40aef032a2e198437f4781a83bfb938db upstream.

If transport_class_register fails we should unregister any
registered classes, or we will leak memory or other
resources.

I did a quick modprobe of scsi_transport_fc to test the
patch.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/scsi/scsi_transport_fc.c