Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2976135lqt; Tue, 23 Apr 2024 07:17:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVsBHIovk1XDe5M28SDymH5TIQxIkU86aEVDTszi35FcNITdXfjmQU6iGbznOjFpb4z+A6QftPXAX5z1dyVi88Pw+3YF+60dK2Q4AlFCA== X-Google-Smtp-Source: AGHT+IFgOdTlq841S61qWt773RGaPgkM8r5dLPhBvSAePBFXCeNCVtmFbqtsG6TUhoZkV42Xbw8F X-Received: by 2002:a50:c00a:0:b0:56d:c721:d0b2 with SMTP id r10-20020a50c00a000000b0056dc721d0b2mr10258209edb.33.1713881828608; Tue, 23 Apr 2024 07:17:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713881828; cv=pass; d=google.com; s=arc-20160816; b=PE2xFsHXNXk2sgHnYfZU19DcCiB1rD2NyYU66dkHqpAqHHGD5083q/r45KYV7uMLsn LRWdmGsFYEEsfW3L36K/eNP+upcIrRORNffxKSOBzEmef5JhGJLo2CoKagMwXxrkExZ5 7bihOwyQbA5MIMf4r1sfpl0BDh2uL48gWB8R0utpt0bCayqeirMnGadBMdq/6L97puNB WZQXykimebLWpwZQFKntgsOeMrZEc8tDd3JZ5O+jATzl8H5zWrbsWTW+Kvm1UgAnwHmk A6alWsufBTeEQXEziTvfEgxmFYXHW8UbgDeZnJA/eNjmKxDXehuGV1LJyM4e5R8Endv6 7cnQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=uozpRzWYBjgm8cTbZvOLXzh8DyhfyNM9Ds5e5SaprAA=; fh=LBi0PMccTIXOXfQkqxxE1wg7D81F/temvILoT+pkIs8=; b=AJ29JnCUDvYgAbKnk4eAg2BrTgQNyOSJH80CO3JZdBOIYEgUGt52hZI8SzCym3+bF4 MOYqsCz77gJHksRDSGxuEtYo17+4y2s9cJonJmokIqyLWZTZC3bYPTBpSpZev+cCkfXz w1X96uZ5atwnOmx4iYbFqS6jc6cStlz0qMB75Q8oiHSgghwhnzQ3kr/SftvfubqxYrjk /czBlMXwWu08tAqIi6UCqpgJOIUno8sUctvsG4HVTn+yr3HdraPZ37WgbiPbX4Gtd1B9 8xciP11g638Ber+OV8hYD9BK7cI5snJIgJyhW/8UMJ0xu0jE3y5x3Aiz9R47W95OTjk2 womA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b="JT8g8/3x"; arc=pass (i=1 spf=pass spfdomain=linux.microsoft.com dkim=pass dkdomain=linux.microsoft.com dmarc=pass fromdomain=linux.microsoft.com); spf=pass (google.com: domain of linux-kernel+bounces-155356-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155356-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id l14-20020aa7d94e000000b0056e22c09d62si7013567eds.260.2024.04.23.07.17.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 07:17:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-155356-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b="JT8g8/3x"; arc=pass (i=1 spf=pass spfdomain=linux.microsoft.com dkim=pass dkdomain=linux.microsoft.com dmarc=pass fromdomain=linux.microsoft.com); spf=pass (google.com: domain of linux-kernel+bounces-155356-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155356-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 47A711F23ADF for ; Tue, 23 Apr 2024 14:17:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1D62E13B58D; Tue, 23 Apr 2024 14:16:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="JT8g8/3x" Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 458A813C810; Tue, 23 Apr 2024 14:16:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713881766; cv=none; b=QPr/6uhyYVBVFZEoTpf+Fdv3kUSgEt+KpLr2FPGAOhzDKLlGIPdCsZOXHaLSV1EJeAlJdnwULFxzgwmWnXacmHdR5BHjS0g314cpB0vPtfGAV1F0EOq7LN7oYy0ZiHpplMwKbAkiJFb9PFwgm7l+qNid1OXFW1zgnlg0gJebL5w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713881766; c=relaxed/simple; bh=+KHG3DtqLql0y+mvhcNwWBsrn4ZTxO3OwoCLAoy4VFQ=; h=From:To:Cc:Subject:Date:Message-Id; b=qWXxLfYXiYZ8rMe3bBvCm+XTv3QQzKFffzw3HM/ezSuY/Ujjyl8WYn0tIp3wTL9cNrNs92P5Q/w0dFtWHCsavbzLohgwEyA5lWr7hjAFu6Gfqa/gqVwLi+j5RF7ywV1ppJGiS3wPQ9nt2R6DYdQz4StVBKViWnc6FepzOwTPobs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=JT8g8/3x; arc=none smtp.client-ip=13.77.154.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id 0FF2120FFC0F; Tue, 23 Apr 2024 07:15:57 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 0FF2120FFC0F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1713881757; bh=uozpRzWYBjgm8cTbZvOLXzh8DyhfyNM9Ds5e5SaprAA=; h=From:To:Cc:Subject:Date:From; b=JT8g8/3xmhtBy/ejF8Ff/NoOKx2yMOZBd9sFg94nakQz4JgiJp5zKFMAJXB95e+zN u9qQlFA6dz8q2aurMKRdS4ZyglmI/GK5KbprEKcOir1AEyLcyAQa+5vsWcb1z0sIsl 42aaCLt40kdFKvfMWeIJeV21sZzFNV34rfaINebs= From: Konstantin Taranov To: nathan@kernel.org, kotaranov@microsoft.com, sharmaajay@microsoft.com, longli@microsoft.com, jgg@ziepe.ca, leon@kernel.org Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH rdma-next 1/1] RDMA/mana_ib: fix missing ret value Date: Tue, 23 Apr 2024 07:15:51 -0700 Message-Id: <1713881751-21621-1-git-send-email-kotaranov@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: From: Konstantin Taranov Set ret to -ENODEV when netdev_master_upper_dev_get_rcu returns NULL. Fixes: 8b184e4f1c32 ("RDMA/mana_ib: Enable RoCE on port 1") Signed-off-by: Konstantin Taranov --- drivers/infiniband/hw/mana/device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/infiniband/hw/mana/device.c b/drivers/infiniband/hw/mana/device.c index fca4d0d85c64..7e09ceb3da53 100644 --- a/drivers/infiniband/hw/mana/device.c +++ b/drivers/infiniband/hw/mana/device.c @@ -87,6 +87,7 @@ static int mana_ib_probe(struct auxiliary_device *adev, upper_ndev = netdev_master_upper_dev_get_rcu(mc->ports[0]); if (!upper_ndev) { rcu_read_unlock(); + ret = -ENODEV; ibdev_err(&dev->ib_dev, "Failed to get master netdev"); goto free_ib_device; } -- 2.43.0