scsi: qla2xxx: Unregister resources in the opposite order of the registration order
authorBart Van Assche <bvanassche@acm.org>
Thu, 4 Apr 2019 19:44:47 +0000 (12:44 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 9 Apr 2019 02:16:34 +0000 (22:16 -0400)
commit59c209a689a66190e6eba7286e9be18ddb3df85b
tree4dbc9006b3e952155587cad0bdcbdd168c693ab8
parentc794d24ec9eb6658909955772e70f34bef5b5b91
scsi: qla2xxx: Unregister resources in the opposite order of the registration order

Make sure that resources are only unregistered after the users of these
resources have been unregistered. Only unregister the character device if
registration of it succeeded.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Giridhar Malavali <gmalavali@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_os.c