Received: by 10.223.176.5 with SMTP id f5csp700619wra; Fri, 9 Feb 2018 05:56:08 -0800 (PST) X-Google-Smtp-Source: AH8x227PEaVaazL5occjHT3eCpKg3bstvVUMJ4cTRaVjHslt+x6NMhngolFSYJ0o3HIXvKBZgNpP X-Received: by 10.99.96.145 with SMTP id u139mr958306pgb.110.1518184568355; Fri, 09 Feb 2018 05:56:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518184568; cv=none; d=google.com; s=arc-20160816; b=giUpkiUKqTg0gsqGLSbkvkGKbqx+d3f2hIty3Zdr1rGLz+EMdrgmeozXq5ziucFgfZ laOx+7hoYOR3lIG9N5YQRsLlTs97w+Gi3ZkGAjxZXfqkWMuiJV4RRqmHVdhM0cq5NICj NPu2obP4qkdDjoHn1VDkqs9GVcBmibaimDGyLiMCygN0DO9Bd6IfNN1zU2X1BV7EqxcW vllJnmayyq7Bg1Sc5v512HdQCWuE7kX4PTcGd00Jz1gUi98ucwcCapuEefTivs0v0kMT mFH5GHGpBLQrJP2cX593ti1+XIXLqQwMDoAaSmVy0UL8ixtxXPOYX6PiAKLxrNYfgl/a k11A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=nlG88uuyiEj7eyJLWJDQDZ2TCSs5x5Kmp9FVkIZx7nw=; b=pCy4HYTzQ9C81tAvFb5ThRYyRhra3rcNYieahOK9wHHacxXGFm37NPDO/zNAF56zpy /LQkv/l+BdP0ijFhJYPwr44g+jEjsv3cCoWzoj3NbBBzAJ4g8iNd15Q0AuNcxxGOHUxT WCka85iLRflV1q7WPm6Tjt+YTkwxIgLo8U7LFRPs0dvSZT2nqueGbjH3Hff+Iug1m9LK Pqx/oJFJ0kWOGC2C276BtKDiuX4JKRPmrn6GI5yhQQI/7jhfu+DAPKk3gzMDTjN90408 61murQapxLbjW2pNZaBgl+6bbKO24AgOSWG+37QhN85nw3NEyJHzQZCJxtzW21/GGfTh B/8w== 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 q1-v6si1558421pls.244.2018.02.09.05.55.54; Fri, 09 Feb 2018 05:56:08 -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 S932099AbeBINpl (ORCPT + 99 others); Fri, 9 Feb 2018 08:45:41 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:51920 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753658AbeBINpi (ORCPT ); Fri, 9 Feb 2018 08:45:38 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id F072010F4; Fri, 9 Feb 2018 13:45:37 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Cathy Avery , "K. Y. Srinivasan" , "Martin K. Petersen" , Long Li Subject: [PATCH 4.14 22/22] scsi: storvsc: missing error code in storvsc_probe() Date: Fri, 9 Feb 2018 14:40:11 +0100 Message-Id: <20180209133935.764813846@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180209133934.024795822@linuxfoundation.org> References: <20180209133934.024795822@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dan Carpenter commit ca8dc694045e9aa248e9916e0f614deb0494cb3d upstream. We should set the error code if fc_remote_port_add() fails. Cc: #v4.12+ Fixes: daf0cd445a21 ("scsi: storvsc: Add support for FC rport.") Signed-off-by: Dan Carpenter Reviewed-by: Cathy Avery Acked-by: K. Y. Srinivasan Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman Signed-off-by: Long Li --- drivers/scsi/storvsc_drv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -1826,8 +1826,10 @@ static int storvsc_probe(struct hv_devic fc_host_node_name(host) = stor_device->node_name; fc_host_port_name(host) = stor_device->port_name; stor_device->rport = fc_remote_port_add(host, 0, &ids); - if (!stor_device->rport) + if (!stor_device->rport) { + ret = -ENOMEM; goto err_out3; + } } #endif return 0;