Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp483242imu; Wed, 19 Dec 2018 23:41:36 -0800 (PST) X-Google-Smtp-Source: AFSGD/V0/WYYuGyQS1guEWWlplYCJsvdrUK4chfw5o54LnRJsc8UX+1dHFWbQaXiM5k0IeU495sU X-Received: by 2002:a17:902:4624:: with SMTP id o33mr22716245pld.289.1545291696773; Wed, 19 Dec 2018 23:41:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545291696; cv=none; d=google.com; s=arc-20160816; b=rOT2wJNKpa6XWQRZq+SgACaJnno15WVUmPOYCeWNloV/V4+l37E1PloN5JUliY9OVh VjF112fXosvf091hYAr3jcBWyirDXDBMvQv9+/8NhvXItrjwB6WoN1EFYwdgiUEbdSX9 ctE6D87yJChVT3qjG+LD+KPFrcm4tiTbrRyI3lyIQg8ChACQa72Egs/fm46EfaxaG+SY qH2v+oDDcyLAYhQEU4MbdgGmMmBs1qbFjdyGQ7Eus/tAM+B3qRup5Sm6JgBmy8JWKhtl I4OtqYEtqq3xXCmEtrYMF01oWan9WkOsrgYCHyOw6rRnSTVXIzLT3bYq388fXkdaa6tv KI8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=n/8H/CxfBJ28zWNoCfTcP3wnExzl8G9hVOrUAWI//BY=; b=C+t7AZMmWngXvC/5fIJIaATtVBzpIOp/KEQ9mCZtkTUf+/kAWqCoM8aSrjkmRlUDVa j85wS7RxfEJuGAjkSKBK/YmTmRHciC6ApjCWa/1zMN+N07qvXLwRhUHp3vIw+U3aeHQx /cXcB3SQl+Z3bURIKNAT2AKOOIdjTl5GMIYFxDS+TrQq3+NsdVCZWGTCni0vi2vZ0+a2 NwYm0xD0AdBWh6FEcdz5CdHIMQ76wdupDLJAAkoiddZEwhSVbPAVrVDBVr+Ij9rg1jgh Xos3e8kv0Dt4TXqdECxZWU41hAf6lR9RAUT6VQLZzhbgKEnPCL/NJJG6t801boCthAVD pWjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q8si14346505pgc.580.2018.12.19.23.41.20; Wed, 19 Dec 2018 23:41:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729940AbeLTDQe (ORCPT + 99 others); Wed, 19 Dec 2018 22:16:34 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:57148 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729627AbeLTDQ0 (ORCPT ); Wed, 19 Dec 2018 22:16:26 -0500 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 536CAC66870C8; Thu, 20 Dec 2018 11:16:23 +0800 (CST) Received: from localhost (10.177.31.96) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.408.0; Thu, 20 Dec 2018 11:16:13 +0800 From: YueHaibing To: , , CC: , , YueHaibing Subject: [PATCH -next] scsi: qla4xxx: check return code of qla4xxx_copy_from_fwddb_param Date: Thu, 20 Dec 2018 11:16:07 +0800 Message-ID: <20181220031607.10588-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.177.31.96] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The return code should be check while qla4xxx_copy_from_fwddb_param fails. Signed-off-by: YueHaibing --- drivers/scsi/qla4xxx/ql4_os.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index 949e186..1bc4db6 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c @@ -7232,6 +7232,8 @@ static int qla4xxx_sysfs_ddb_tgt_create(struct scsi_qla_host *ha, rc = qla4xxx_copy_from_fwddb_param(fnode_sess, fnode_conn, fw_ddb_entry); + if (rc) + goto free_sess; ql4_printk(KERN_INFO, ha, "%s: sysfs entry %s created\n", __func__, fnode_sess->dev.kobj.name); -- 2.7.0