* [PATCH -next] IB/ipoib: Fix error return code in ipoib_dev_init()
@ 2018-07-11 13:15 Wei Yongjun
2018-07-16 20:25 ` Yuval Shaia
2018-07-24 20:57 ` Jason Gunthorpe
0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2018-07-11 13:15 UTC (permalink / raw)
To: kernel-janitors
Fix to return a negative error code from the ipoib_neigh_hash_init()
error handling case instead of 0, as done elsewhere in this function.
Fixes: 515ed4f3aab4 ("IB/IPoIB: Separate control and data related initializations")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/infiniband/ulp/ipoib/ipoib_main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 9bcd487..d11adfa 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -1791,7 +1791,8 @@ int ipoib_dev_init(struct net_device *dev, struct ib_device *ca, int port)
goto out_free_pd;
}
- if (ipoib_neigh_hash_init(priv) < 0) {
+ ret = ipoib_neigh_hash_init(priv);
+ if (ret < 0) {
pr_warn("%s failed to init neigh hash\n", dev->name);
goto out_dev_uninit;
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] IB/ipoib: Fix error return code in ipoib_dev_init()
2018-07-11 13:15 [PATCH -next] IB/ipoib: Fix error return code in ipoib_dev_init() Wei Yongjun
@ 2018-07-16 20:25 ` Yuval Shaia
2018-07-24 20:57 ` Jason Gunthorpe
1 sibling, 0 replies; 3+ messages in thread
From: Yuval Shaia @ 2018-07-16 20:25 UTC (permalink / raw)
To: kernel-janitors
On Wed, Jul 11, 2018 at 01:15:42PM +0000, Wei Yongjun wrote:
> Fix to return a negative error code from the ipoib_neigh_hash_init()
> error handling case instead of 0, as done elsewhere in this function.
>
> Fixes: 515ed4f3aab4 ("IB/IPoIB: Separate control and data related initializations")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> drivers/infiniband/ulp/ipoib/ipoib_main.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> index 9bcd487..d11adfa 100644
> --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
> +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> @@ -1791,7 +1791,8 @@ int ipoib_dev_init(struct net_device *dev, struct ib_device *ca, int port)
> goto out_free_pd;
> }
>
> - if (ipoib_neigh_hash_init(priv) < 0) {
> + ret = ipoib_neigh_hash_init(priv);
> + if (ret < 0) {
> pr_warn("%s failed to init neigh hash\n", dev->name);
> goto out_dev_uninit;
> }
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] IB/ipoib: Fix error return code in ipoib_dev_init()
2018-07-11 13:15 [PATCH -next] IB/ipoib: Fix error return code in ipoib_dev_init() Wei Yongjun
2018-07-16 20:25 ` Yuval Shaia
@ 2018-07-24 20:57 ` Jason Gunthorpe
1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2018-07-24 20:57 UTC (permalink / raw)
To: kernel-janitors
On Wed, Jul 11, 2018 at 01:15:42PM +0000, Wei Yongjun wrote:
> Fix to return a negative error code from the ipoib_neigh_hash_init()
> error handling case instead of 0, as done elsewhere in this function.
>
> Fixes: 515ed4f3aab4 ("IB/IPoIB: Separate control and data related initializations")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
> ---
> drivers/infiniband/ulp/ipoib/ipoib_main.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Applied to for-next, thanks
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> index 9bcd487..d11adfa 100644
> --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
> +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> @@ -1791,7 +1791,8 @@ int ipoib_dev_init(struct net_device *dev, struct ib_device *ca, int port)
> goto out_free_pd;
> }
>
> - if (ipoib_neigh_hash_init(priv) < 0) {
> + ret = ipoib_neigh_hash_init(priv);
> + if (ret < 0) {
However I changed this to the cannonical 'if (ret)' format.
Jason
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-07-24 20:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-11 13:15 [PATCH -next] IB/ipoib: Fix error return code in ipoib_dev_init() Wei Yongjun
2018-07-16 20:25 ` Yuval Shaia
2018-07-24 20:57 ` Jason Gunthorpe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.