projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4f71055
)
IPoIB: fix error handling in ipoib_open
author
Roland Dreier
<rolandd@cisco.com>
Tue, 29 Nov 2005 18:55:58 +0000
(10:55 -0800)
committer
Roland Dreier
<rolandd@cisco.com>
Tue, 29 Nov 2005 18:55:58 +0000
(10:55 -0800)
If ipoib_ib_dev_up() fails after ipoib_ib_dev_open() is called, then
ipoib_ib_dev_stop() needs to be called to clean up.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/ulp/ipoib/ipoib_main.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/ulp/ipoib/ipoib_main.c
b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 826d7a73ef8481c3834f69554cadf3d7ff3d26c3..475d98fa9e26645c2b76b001d08bbea0fc6d12a7 100644
(file)
--- a/
drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/
drivers/infiniband/ulp/ipoib/ipoib_main.c
@@
-94,8
+94,10
@@
int ipoib_open(struct net_device *dev)
if (ipoib_ib_dev_open(dev))
return -EINVAL;
- if (ipoib_ib_dev_up(dev))
+ if (ipoib_ib_dev_up(dev)) {
+ ipoib_ib_dev_stop(dev);
return -EINVAL;
+ }
if (!test_bit(IPOIB_FLAG_SUBINTERFACE, &priv->flags)) {
struct ipoib_dev_priv *cpriv;