]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ksmbd: Remove unneeded if check in ksmbd_rdma_capable_netdev()
authorThorsten Blum <thorsten.blum@linux.dev>
Mon, 30 Dec 2024 12:44:56 +0000 (13:44 +0100)
committerSteve French <stfrench@microsoft.com>
Mon, 6 Jan 2025 02:43:37 +0000 (20:43 -0600)
Remove the unnecessary if check and assign the result directly.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/server/transport_rdma.c

index 0ef3c9f0bfebd0b45131fe1b9333b4c1db299918..c3785a5434f9ef4e9b104bf16cb2e6df1064d0b3 100644 (file)
@@ -2283,8 +2283,7 @@ out:
 
                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);
                }
        }