lkml.org 
[lkml]   [2020]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.4 003/100] qlcnic: Fix bad kzalloc null test
    Date
    From: Xu Wang <vulab@iscas.ac.cn>

    [ Upstream commit bcaeb886ade124331a6f3a5cef34a3f1484c0a03 ]

    In qlcnic_83xx_get_reset_instruction_template, the variable
    of null test is bad, so correct it.

    Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
    index 26263a192a77e..083aeca77c758 100644
    --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
    +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
    @@ -1724,7 +1724,7 @@ static int qlcnic_83xx_get_reset_instruction_template(struct qlcnic_adapter *p_d

    ahw->reset.seq_error = 0;
    ahw->reset.buff = kzalloc(QLC_83XX_RESTART_TEMPLATE_SIZE, GFP_KERNEL);
    - if (p_dev->ahw->reset.buff == NULL)
    + if (ahw->reset.buff == NULL)
    return -ENOMEM;

    p_buff = p_dev->ahw->reset.buff;
    --
    2.20.1


    \
     
     \ /
      Last update: 2020-04-22 13:04    [W:4.128 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site