Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp574794img; Fri, 22 Mar 2019 04:20:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqyN5H2IGjAT1Nblo+i9ni6hyEXVtcOSIhk1wgDrFRmcuxHgkHvanOm+ptGTYTPaksxgUjXo X-Received: by 2002:a63:d54f:: with SMTP id v15mr8390752pgi.318.1553253648590; Fri, 22 Mar 2019 04:20:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553253648; cv=none; d=google.com; s=arc-20160816; b=hKGL1vZ7ES6PT4KmSfeKShGAik34FuYoIrOinmdLNxZ5AvX6mxTRiKMBEcLKUePkN2 dteVDqvAg7BG4ODNFgDdD4JxbINmNGQfR5uKaW7LRM4pXn6pvXTiwqlpQMzHGWmozQm5 tb2NneagW1SZUAyIaeiAZmbBuGLY5WpwtZ4NlUyla+PGAPYNj2U3oCUXh3f7yK7huqNR GV35H7OoM1S6vlBZ1U5Sbm1sKXadDuRKPDBCf9qvCj1t4iUzeOjz0mDiFsNXikhMnEOL yE8sDDRmnKyg3P0yYrKWU+zm/pOeUYJ7J9QgAWl0aT1uPUJV++BdOA/6phmO7mGfASia LGpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Vz9AmBVQOOxZglorAVhJ6G5iENR7uEknlYpPALi+ddI=; b=NZxwMrLUg1Wc3v/4hf59Y2lEacDjA8+EqcwEX/j/9clBpZ12ClSgDs/jq51iVvsYgn zttMO+ri0jpdvazV1iBmlXdLm6iH28Wb8xV6DYd2m5GzgUkgQ5TIeW4EsLdbRUp01geK 6FVi0f84WAplx3Nbqt4MlUsJLtX4wFN+QMNDHLwf01TQg1y7IYeKYv4B/4ZmWE6GdURO QVX+6p7XlQ1BKqCbymDbaLuA4oItHdxFAdpJs+sOEcMO6Y7QcHNLUNCX4GI1rd8rh6Y9 eeo0sqWkSCfSx+3tvEPtIGKSUmshuNFSwCknLl+C+RCDqTZG4GP8Gyxfaw+N+dhYMjQF 8M/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ESBWXA79; 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 33si7150646pls.161.2019.03.22.04.20.30; Fri, 22 Mar 2019 04:20:48 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=ESBWXA79; 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 S1728197AbfCVLTl (ORCPT + 99 others); Fri, 22 Mar 2019 07:19:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:46078 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726667AbfCVLTi (ORCPT ); Fri, 22 Mar 2019 07:19:38 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A83C52190A; Fri, 22 Mar 2019 11:19:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553253578; bh=MCD62IVRJOeVzwt0ZctsXDm4Oen2gi0e5BjzhuUKlt0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ESBWXA79q41aAeaN4dVWFN5TugqAhIqHm8ryUVwOI1H2c7ZsM/0z8s/uifY6upPnK e6zAQxTGbnvSknr872jR1TYH0OFUAllg6vgOBeyFDcUTY0awTytZqaC1JcIVUR4dhF 4zZdByqtXVJk0FB0wGI8zRsAsv4JPQwr+OSfuX9g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, YueHaibing , Manish Rangankar , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 3.18 011/134] scsi: qla4xxx: check return code of qla4xxx_copy_from_fwddb_param Date: Fri, 22 Mar 2019 12:13:44 +0100 Message-Id: <20190322111210.942859405@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190322111210.465931067@linuxfoundation.org> References: <20190322111210.465931067@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 72b4a0465f995175a2e22cf4a636bf781f1f28a7 ] The return code should be check while qla4xxx_copy_from_fwddb_param fails. Signed-off-by: YueHaibing Acked-by: Manish Rangankar Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- 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 d0cad6fc598e1..a9fac1eb8306a 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c @@ -7251,6 +7251,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.19.1