Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp8418726ybl; Thu, 16 Jan 2020 16:30:26 -0800 (PST) X-Google-Smtp-Source: APXvYqyL4SH1sDu/3iv08EvSrkqJX9nb/LM2nsbRXiQnM+Vf+xXjTNPSO5fg94CLd9ViABBmCCBW X-Received: by 2002:aca:cf58:: with SMTP id f85mr1518979oig.6.1579221025932; Thu, 16 Jan 2020 16:30:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579221025; cv=none; d=google.com; s=arc-20160816; b=0JtoaJahqDUxLHUa9DLQzLH8WpCuzGRm8UiUbD58fZ5OMPZg1+qHhbA1KsEWvXASry fPtyt/aa1RWQQzCt7Ae0MDOAKLbd919WmRrUaT3YrvsNMgSZenQ4QNiwvxGAi9ubuacZ fRlFQbyAnrbj4LmPFfJbrsGg9Q+dn6pQuyG3ZKOe/sJit3wPGIftNWNdO6DLM5leCvIp sORXDHaujULWUAzSBO4f4Qi0AnslwcByHIFnffo/dpW6kj+oxJxYNREu/DQKMzyV+7ZG RYJyWthHhKkXPH/nxOiYOep3PA45YMJ34/jX5HVM7hrqsTGa3pU3qNeDcAnmDwE6OkZk CArA== 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=HICjzqpGVr3GNcmEAp6WFOT/C2Uek9Q5bbzPEP66Z+s=; b=lHjG1SlUDDdRPugadcQQrhnYu+f9Qq15E4Vzhg5wCR2b3w3CvJ2NwoJ/9a46H6IxK2 rUhs7TDV3AjjErBETeQTI/MT6+Lc8eg+memuDx5iKKqsbOIa62OIGwBQhivzxP94na9n xjm/IAGqKIC0St3XUltYMLo85hpuUKmIDYUtfsvkEZetsJPElhMcpRa5HBZuCKOcGdq3 3WQv32NGaZMABCnoRR/E+gxzv4t7FT73H7syf0qQeUGiQP5lnyhNYJZKsDo8d6U2vIfr 6e9x53R04cmAU1rcu6l37BDpuMOE0zx/Fk7MsefyHa+BRhcz65aIFjsCF2mQJzeEHLxU 1Hog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rBXdlbWc; 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 i8si13435809otp.254.2020.01.16.16.30.10; Thu, 16 Jan 2020 16:30:25 -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; dkim=pass header.i=@kernel.org header.s=default header.b=rBXdlbWc; 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 S2388626AbgAPXVh (ORCPT + 99 others); Thu, 16 Jan 2020 18:21:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:48946 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390841AbgAPXVe (ORCPT ); Thu, 16 Jan 2020 18:21:34 -0500 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 BC40F20684; Thu, 16 Jan 2020 23:21:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579216894; bh=UkKZKQjcFR/L9SdLEmzhc6Q5BcXNE8y+WPiXgyb7swc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rBXdlbWc3Xm9du4vagX0W0RH9t45yKbQNH7tYVOZcv5D+hTSAizWoeSCVbhvFQhby 2OzfmKfk4bZLuFLcb5eIzEMBNKFGOB184ie/B2s7LT7wi2Em0Crfg7Ocmq/Q2cFZjO 6dUAqnE81fif/mI+HQJUviT8K1m1TegDjLkM7eP8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lang Cheng , Weihang Li , Doug Ledford Subject: [PATCH 5.4 063/203] RDMA/hns: Modify return value of restrack functions Date: Fri, 17 Jan 2020 00:16:20 +0100 Message-Id: <20200116231749.565691000@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200116231745.218684830@linuxfoundation.org> References: <20200116231745.218684830@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Lang Cheng commit cfd82da4e741c16d71a12123bf0cb585af2b8796 upstream. The restrack function return EINVAL instead of EMSGSIZE when the driver operation fails. Fixes: 4b42d05d0b2c ("RDMA/hns: Remove unnecessary kzalloc") Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Link: https://lore.kernel.org/r/1567566885-23088-5-git-send-email-liweihang@hisilicon.com Signed-off-by: Doug Ledford Signed-off-by: Greg Kroah-Hartman --- drivers/infiniband/hw/hns/hns_roce_restrack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/infiniband/hw/hns/hns_roce_restrack.c +++ b/drivers/infiniband/hw/hns/hns_roce_restrack.c @@ -95,7 +95,7 @@ static int hns_roce_fill_res_cq_entry(st ret = hr_dev->dfx->query_cqc_info(hr_dev, hr_cq->cqn, (int *)context); if (ret) - goto err; + return -EINVAL; table_attr = nla_nest_start(msg, RDMA_NLDEV_ATTR_DRIVER); if (!table_attr) {