lkml.org 
[lkml]   [2014]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.14 128/228] clk: vexpress: NULL dereference on error path
    Date
    3.14-stable review patch.  If anyone has any objections, please let me know.

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

    From: Dan Carpenter <dan.carpenter@oracle.com>

    commit 6b4ed8b00e93bd31f24a25f59ed8d1b808d0cc00 upstream.

    If the allocation fails then we dereference the NULL in the error path.
    Just return directly.

    Fixes: ed27ff1db869 ('clk: Versatile Express clock generators ("osc") driver')
    Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
    Signed-off-by: Pawel Moll <pawel.moll@arm.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/clk/versatile/clk-vexpress-osc.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/drivers/clk/versatile/clk-vexpress-osc.c
    +++ b/drivers/clk/versatile/clk-vexpress-osc.c
    @@ -102,7 +102,7 @@ void __init vexpress_osc_of_setup(struct

    osc = kzalloc(sizeof(*osc), GFP_KERNEL);
    if (!osc)
    - goto error;
    + return;

    osc->func = vexpress_config_func_get_by_node(node);
    if (!osc->func) {



    \
     
     \ /
      Last update: 2014-06-05 03:01    [W:2.315 / U:0.324 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site