lkml.org 
[lkml]   [2020]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.9 127/252] IB/hfi1: Fix error return code in hfi1_init_dd()
    Date
    From: Zhang Changzhong <zhangchangzhong@huawei.com>

    [ Upstream commit dabbd6abcdbeb1358a53ec28a244429320eb0e3a ]

    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")
    Link: https://lore.kernel.org/r/1605249747-17942-1-git-send-email-zhangchangzhong@huawei.com
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
    Acked-by: Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    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 7eaf995382168..c87b94ea29397 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.27.0


    \
     
     \ /
      Last update: 2020-11-23 14:09    [W:3.836 / U:0.288 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site