lkml.org 
[lkml]   [2016]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.2.y-ckt 134/211] hsi: fix double kfree
    Date
    4.2.8-ckt1 -stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Geliang Tang <geliangtang@163.com>

    commit f098a045350ecd6045f2f2d5a50fecf2a98962d7 upstream.

    When device_register() fails, kfree() is called in hsi_client_release(),
    hence there is no need to call kfree in err3 again.

    Fixes: a2aa24734d9db ("HSI: Add common DT binding for HSI client devices")
    Signed-off-by: Geliang Tang <geliangtang@163.com>
    Signed-off-by: Sebastian Reichel <sre@kernel.org>
    Signed-off-by: Kamal Mostafa <kamal@canonical.com>
    ---
    drivers/hsi/hsi.c | 1 -
    1 file changed, 1 deletion(-)

    diff --git a/drivers/hsi/hsi.c b/drivers/hsi/hsi.c
    index fe93712..35d631e 100644
    --- a/drivers/hsi/hsi.c
    +++ b/drivers/hsi/hsi.c
    @@ -300,7 +300,6 @@ static void hsi_add_client_from_dt(struct hsi_port *port,
    if (device_register(&cl->device) < 0) {
    pr_err("hsi: failed to register client: %s\n", name);
    put_device(&cl->device);
    - goto err3;
    }

    return;
    --
    1.9.1


    \
     
     \ /
      Last update: 2016-01-05 22:01    [W:4.055 / U:0.576 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site