Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.
Fixes: 4730f4a6c6b2 ("IB/hfi1: Activate the dummy netdev")
Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Zhang Changzhong <[email protected]>
---
drivers/infiniband/hw/hfi1/chip.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/hfi1/chip.c b/drivers/infiniband/hw/hfi1/chip.c
index 7eaf9953..c87b94e 100644
--- a/drivers/infiniband/hw/hfi1/chip.c
+++ b/drivers/infiniband/hw/hfi1/chip.c
@@ -15245,7 +15245,8 @@ int hfi1_init_dd(struct hfi1_devdata *dd)
& CCE_REVISION_SW_MASK);
/* alloc netdev data */
- if (hfi1_netdev_alloc(dd))
+ ret = hfi1_netdev_alloc(dd);
+ if (ret)
goto bail_cleanup;
ret = set_up_context_variables(dd);
--
2.9.5
On 11/13/2020 1:42 AM, Zhang Changzhong wrote:
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
>
> Fixes: 4730f4a6c6b2 ("IB/hfi1: Activate the dummy netdev")
> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: Zhang Changzhong <[email protected]>
We actually have this exact patch queued but have not yet sent it.
You saved us the trouble!
Mike
Acked-by: Mike Marciniszyn <[email protected]>
On Fri, Nov 13, 2020 at 02:42:27PM +0800, Zhang Changzhong wrote:
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
>
> Fixes: 4730f4a6c6b2 ("IB/hfi1: Activate the dummy netdev")
> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: Zhang Changzhong <[email protected]>
> Acked-by: Mike Marciniszyn <[email protected]>
> ---
> drivers/infiniband/hw/hfi1/chip.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Applied to for-rc, thanks
Jason