Skip to content

Commit f539573

Browse files
committed
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma
Pull rdma fixes from Jason Gunthorpe: - Revert a change to the VLAN logic, this broke previously working ROCE configurations - Fix a memory leak on error unwinding in bnxt_re * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: Revert "RDMA/core: Fix ENODEV error for iWARP test over vlan" RDMA/bnxt_re: Remove some dead code RDMA/bnxt_re: Fix some error handling paths in bnxt_re_probe()
2 parents 1b597e1 + 6abe2a9 commit f539573

File tree

2 files changed

+8
-21
lines changed

2 files changed

+8
-21
lines changed

drivers/infiniband/core/addr.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,6 @@ rdma_find_ndev_for_src_ip_rcu(struct net *net, const struct sockaddr *src_in)
269269
break;
270270
#endif
271271
}
272-
if (!ret && dev && is_vlan_dev(dev))
273-
dev = vlan_dev_real_dev(dev);
274272
return ret ? ERR_PTR(ret) : dev;
275273
}
276274

drivers/infiniband/hw/bnxt_re/main.c

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -300,9 +300,6 @@ static void bnxt_re_shutdown(struct auxiliary_device *adev)
300300
struct bnxt_re_en_dev_info *en_info = auxiliary_get_drvdata(adev);
301301
struct bnxt_re_dev *rdev;
302302

303-
if (!en_info)
304-
return;
305-
306303
rdev = en_info->rdev;
307304
ib_unregister_device(&rdev->ibdev);
308305
bnxt_re_dev_uninit(rdev, BNXT_RE_COMPLETE_REMOVE);
@@ -316,9 +313,6 @@ static void bnxt_re_stop_irq(void *handle)
316313
struct bnxt_qplib_nq *nq;
317314
int indx;
318315

319-
if (!en_info)
320-
return;
321-
322316
rdev = en_info->rdev;
323317
rcfw = &rdev->rcfw;
324318

@@ -339,9 +333,6 @@ static void bnxt_re_start_irq(void *handle, struct bnxt_msix_entry *ent)
339333
struct bnxt_qplib_nq *nq;
340334
int indx, rc;
341335

342-
if (!en_info)
343-
return;
344-
345336
rdev = en_info->rdev;
346337
msix_ent = rdev->en_dev->msix_entries;
347338
rcfw = &rdev->rcfw;
@@ -1991,10 +1982,6 @@ static void bnxt_re_remove(struct auxiliary_device *adev)
19911982
struct bnxt_re_dev *rdev;
19921983

19931984
mutex_lock(&bnxt_re_mutex);
1994-
if (!en_info) {
1995-
mutex_unlock(&bnxt_re_mutex);
1996-
return;
1997-
}
19981985
rdev = en_info->rdev;
19991986

20001987
if (rdev)
@@ -2025,7 +2012,15 @@ static int bnxt_re_probe(struct auxiliary_device *adev,
20252012
auxiliary_set_drvdata(adev, en_info);
20262013

20272014
rc = bnxt_re_add_device(adev, BNXT_RE_COMPLETE_INIT);
2015+
if (rc)
2016+
goto err;
20282017
mutex_unlock(&bnxt_re_mutex);
2018+
return 0;
2019+
2020+
err:
2021+
mutex_unlock(&bnxt_re_mutex);
2022+
kfree(en_info);
2023+
20292024
return rc;
20302025
}
20312026

@@ -2035,9 +2030,6 @@ static int bnxt_re_suspend(struct auxiliary_device *adev, pm_message_t state)
20352030
struct bnxt_en_dev *en_dev;
20362031
struct bnxt_re_dev *rdev;
20372032

2038-
if (!en_info)
2039-
return 0;
2040-
20412033
rdev = en_info->rdev;
20422034
en_dev = en_info->en_dev;
20432035
mutex_lock(&bnxt_re_mutex);
@@ -2082,9 +2074,6 @@ static int bnxt_re_resume(struct auxiliary_device *adev)
20822074
struct bnxt_re_en_dev_info *en_info = auxiliary_get_drvdata(adev);
20832075
struct bnxt_re_dev *rdev;
20842076

2085-
if (!en_info)
2086-
return 0;
2087-
20882077
mutex_lock(&bnxt_re_mutex);
20892078
/* L2 driver may invoke this callback during device recovery, resume.
20902079
* reset. Current RoCE driver doesn't recover the device in case of

0 commit comments

Comments
 (0)