Skip to contentSkip to conversation

ksmbd: Remove unneeded if check in ksmbd_rdma_capable_netdev()

PATCH Applied Thorsten Blum 2 participants 2 messages Dec 30, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ksmbd: Remove unneeded if check in ksmbd_rdma_capable_netdev()

Remove the unnecessary if check and assign the result directly.

---
 fs/smb/server/transport_rdma.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/smb/server/transport_rdma.c +1 -2
index 0ef3c9f0bfeb..c3785a5434f9 100644
@@ -2283,8 +2283,7 @@ bool ksmbd_rdma_capable_netdev(struct net_device *netdev)
 
 		ibdev = ib_device_get_by_netdev(netdev, RDMA_DRIVER_UNKNOWN);
 		if (ibdev) {
-			if (rdma_frwr_is_supported(&ibdev->attrs))
-				rdma_capable = true;
+			rdma_capable = rdma_frwr_is_supported(&ibdev->attrs);
 			ib_device_put(ibdev);
 		}
 	}
Signature · 1 line
2.47.1