From: Hillf Danton Date: Wed, 27 Jul 2011 22:10:34 +0000 (-0700) Subject: [SCSI] libfc: release exchg cache X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6f06e3a7b2f2d840d42a0c2b9906f444e8f2eba6;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [SCSI] libfc: release exchg cache If fail to create workqueue, the newly created cache for exchg has to be released. Signed-off-by: Hillf Danton Reviewed-by: Vasu Dev Signed-off-by: Robert Love Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c index f5a0665b6773..7baf2239ce07 100644 --- a/drivers/scsi/libfc/fc_exch.c +++ b/drivers/scsi/libfc/fc_exch.c @@ -2465,8 +2465,11 @@ int fc_setup_exch_mgr(void) fc_exch_workqueue = create_singlethread_workqueue("fc_exch_workqueue"); if (!fc_exch_workqueue) - return -ENOMEM; + goto err; return 0; +err: + kmem_cache_destroy(fc_em_cachep); + return -ENOMEM; } /**