scsi: pmcraid: Add missing resource releases
authorQuentin Lambert <lambert.quentin@gmail.com>
Sat, 19 Nov 2016 17:43:18 +0000 (18:43 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 22 Nov 2016 22:04:32 +0000 (17:04 -0500)
commit2d76a2478bb8c54d241b23a699d55f90b7efd036
treebf5211c46f225ad49b5a26873f9c3b7c6df9f056
parent75b1cc4ad63afa28c1a045b5157c008f405f06a9
scsi: pmcraid: Add missing resource releases

Most error branches following the call to pmcraid_get_free_cmd contain a
call to pmcraid_return_cmd. This patch add these calls where they are
missing.

Moreover, most error branches following the call to class_create contain
a call to class_destroy. This patch add these calls where they are
missing.

This issue was found with Hector.

Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/pmcraid.c