Messages in this thread | | | Subject | Re: [PATCH V3] clk: vc5: Add memory check to prevent oops | From | Stephen Boyd <> | Date | Wed, 22 Jul 2020 18:46:47 -0700 |
| |
Quoting Adam Ford (2020-07-16 05:26:20) > When getting the names of the child nodes, kasprintf is used to > allocate memory which is used to create the string for the node > name. Unfortunately, there is no memory check to determine > if this allocation fails, it may cause an error when trying > to get child node name. > > This patch will check if the memory allocation fails, and returns > and -ENOMEM error instead of blindly moving on. > > Fixes: 260249f929e8 ("clk: vc5: Enable addition output configurations of the Versaclock") > > Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> > Signed-off-by: Adam Ford <aford173@gmail.com> > Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net> > ---
Applied to clk-next
| |