summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2018-03-01 17:23:54 +0100
committerJason Gunthorpe <jgg@mellanox.com>2018-03-07 00:00:51 +0100
commit042932f7a3274126ee3bfb2516e8d8260c545b11 (patch)
treeea7c322c884ab3936502bd4c8d368ba00191ba0e /drivers/infiniband
parentIB/rxe: Remove unused variable (char *rxe_qp_state_name[]) (diff)
downloadlinux-042932f7a3274126ee3bfb2516e8d8260c545b11.tar.xz
linux-042932f7a3274126ee3bfb2516e8d8260c545b11.zip
infiniband: remove redundant assignment to pointer 'rdi'
The pointer rdi is being initialized with a value that is never read and re-assigned immediately after, hence the initialization is redundant and can be removed. Cleans up clang warning: drivers/infiniband/sw/rdmavt/vt.c:94:23: warning: Value stored to 'rdi' during its initialization is never read Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/sw/rdmavt/vt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/sw/rdmavt/vt.c b/drivers/infiniband/sw/rdmavt/vt.c
index a4553b2b3696..a67b0ddc2230 100644
--- a/drivers/infiniband/sw/rdmavt/vt.c
+++ b/drivers/infiniband/sw/rdmavt/vt.c
@@ -91,7 +91,7 @@ module_exit(rvt_cleanup);
*/
struct rvt_dev_info *rvt_alloc_device(size_t size, int nports)
{
- struct rvt_dev_info *rdi = ERR_PTR(-ENOMEM);
+ struct rvt_dev_info *rdi;
rdi = (struct rvt_dev_info *)ib_alloc_device(size);
if (!rdi)