Skip to content

Commit 042932f

Browse files
Colin Ian Kingjgunthorpe
authored andcommitted
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 <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent c33bab6 commit 042932f

File tree

1 file changed

+1
-1
lines changed
  • drivers/infiniband/sw/rdmavt

1 file changed

+1
-1
lines changed

drivers/infiniband/sw/rdmavt/vt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ module_exit(rvt_cleanup);
9191
*/
9292
struct rvt_dev_info *rvt_alloc_device(size_t size, int nports)
9393
{
94-
struct rvt_dev_info *rdi = ERR_PTR(-ENOMEM);
94+
struct rvt_dev_info *rdi;
9595

9696
rdi = (struct rvt_dev_info *)ib_alloc_device(size);
9797
if (!rdi)

0 commit comments

Comments
 (0)