IB/mlx5: avoid destroying a NULL mr in reg_user_mr error flow
authorHaggai Eran <haggaie@mellanox.com>
Tue, 1 Sep 2015 06:56:56 +0000 (09:56 +0300)
committerDoug Ledford <dledford@redhat.com>
Thu, 3 Sep 2015 18:42:54 +0000 (14:42 -0400)
commit11d748045c6dadb279d1acdb6d2ea8f3f2ede85b
tree0c9fedcfe6b092e1e277b4651330ff9deb3221e0
parentb632ffa7cee439ba5dce3b3bc4a5cbe2b3e20133
IB/mlx5: avoid destroying a NULL mr in reg_user_mr error flow

The mlx5_ib_reg_user_mr() function will attempt to call clean_mr() in
its error flow even though there is never a case where the error flow
occurs with a valid MR pointer to destroy.

Remove the clean_mr() call and the incorrect comment above it.

Fixes: b4cfe447d47b ("IB/mlx5: Implement on demand paging by adding
support for MMU notifiers")
Cc: Eli Cohen <eli@mellanox.com>
Signed-off-by: Haggai Eran <haggaie@mellanox.com>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx5/mr.c