From patchwork Fri Jul 29 15:54:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9252649 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5B16460757 for ; Fri, 29 Jul 2016 15:54:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4CD1D2833B for ; Fri, 29 Jul 2016 15:54:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3F9582837F; Fri, 29 Jul 2016 15:54:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C19412833B for ; Fri, 29 Jul 2016 15:54:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752524AbcG2Pyz (ORCPT ); Fri, 29 Jul 2016 11:54:55 -0400 Received: from mail-pa0-f67.google.com ([209.85.220.67]:34581 "EHLO mail-pa0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751563AbcG2Pyy (ORCPT ); Fri, 29 Jul 2016 11:54:54 -0400 Received: by mail-pa0-f67.google.com with SMTP id hh10so5443144pac.1 for ; Fri, 29 Jul 2016 08:54:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fMYA+n4NqFgEWXY4uNt7yjtCOuhLMNYZm6+KIQqO5kk=; b=QrGeDlvcCXwsZ4zdr3xmgyDbOtgH2LC2QT+s206cClBkZtq9WNZjBgS55U8U70S1ZT ynJgyJJqkDing+ZT/qTqenlIdAcQpvlfz5Ft1uebJmdkfrZkiIo8VDI5BFHQS1X3hDFW nvPzFw4dpaU1ro1pPEUyTRgQD+fx1S8sHbMQauYLMUgCL+GAMZyEgtNHWSqUMGyOqgfg Z4bD80TwGm0afdWu4oUPQ7gAgegzLDACwY4PwnFQHSnOGGSwU2QTux2UqBZXjA5F5KZd gxx2a44y/ALBMG2ufSmQCIhhBbGpReDJkjmva+N5tIcBTmeX7niJmId8j4dZZE78FcSv 64ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fMYA+n4NqFgEWXY4uNt7yjtCOuhLMNYZm6+KIQqO5kk=; b=Awqwh26MiNPQHCMJHCB7O46CoEIIsPHO7yyHPjOWqwe/585L0Ruy0rLD7ZO8NsPx/2 I3r7o1TUkY+4IA2iGUm8/Qp6MQIM4hBYaYlIj6nOmcWMWbf0uYSgplCNlARoQh5RxzYJ 2mV1lWQrkk5PXFhz/TPylLBpHaF1DyJozHGuxgJ5pXdV2KhrS/b+A9zdGxmfn7Oidesm TsRS/2QXf1epKn8hwGgKUx9k9w7L4Tn1jYlxl8Xm98Phuskz+hYuAfeTb8HUcL3vJ57H QqSMVMNKhYw+/KFc+sxJ6YVFjNNyGxfym53u6qDw5AcHmmPZ5ae4KVhb9RA8yLNV5v4i XFdg== X-Gm-Message-State: AEkooutBa6S3itDn4h93wNXOmxRui8hA9EOS37IXSbAQb1k3P4sy+LstcloNzOvHSE5kQA== X-Received: by 10.66.185.228 with SMTP id ff4mr56574192pac.41.1469807693801; Fri, 29 Jul 2016 08:54:53 -0700 (PDT) Received: from localhost.localdomain.localdomain (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id zk7sm25917895pac.41.2016.07.29.08.54.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Jul 2016 08:54:53 -0700 (PDT) From: Wei Yongjun To: Johannes Thumshirn , "James E.J. Bottomley" , "Martin K. Petersen" Cc: Wei Yongjun , fcoe-devel@open-fcoe.org, linux-scsi@vger.kernel.org Subject: [PATCH -next] fcoe: add missing destroy_workqueue() on error in fcoe_init() Date: Fri, 29 Jul 2016 15:54:48 +0000 Message-Id: <1469807688-32470-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add the missing destroy_workqueue() before return from fcoe_init() in the fcoe transport register failed error handling case. Signed-off-by: Wei Yongjun Acked-by: Johannes Thumshirn --- drivers/scsi/fcoe/fcoe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 197dc62..9bd41a3 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c @@ -2495,7 +2495,7 @@ static int __init fcoe_init(void) if (rc) { printk(KERN_ERR "failed to register an fcoe transport, check " "if libfcoe is loaded\n"); - return rc; + goto out_destroy; } mutex_lock(&fcoe_config_mutex); @@ -2518,6 +2518,7 @@ static int __init fcoe_init(void) out_free: mutex_unlock(&fcoe_config_mutex); +out_destroy: destroy_workqueue(fcoe_wq); return rc; }