lkml.org 
[lkml]   [2020]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] perf diff: fix error return value in __cmd_diff()
Em Fri, Nov 27, 2020 at 10:35:37PM +0900, Namhyung Kim escreveu:
> Hello,
>
> On Tue, Nov 24, 2020 at 7:37 PM Zhen Lei <thunder.leizhen@huawei.com> wrote:
> >
> > An appropriate return value should be set on the failed path.
> >
> > Reported-by: Hulk Robot <hulkci@huawei.com>
> > Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
>
> Acked-by: Namhyung Kim <namhyung@kernel.org>

Thanks, applied.

- Arnaldo


> Thanks,
> Namhyung
>
> > ---
> > tools/perf/builtin-diff.c | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
> > index 584e2e1a3793..cefc71506409 100644
> > --- a/tools/perf/builtin-diff.c
> > +++ b/tools/perf/builtin-diff.c
> > @@ -1222,8 +1222,10 @@ static int __cmd_diff(void)
> > if (compute == COMPUTE_STREAM) {
> > d->evlist_streams = evlist__create_streams(
> > d->session->evlist, 5);
> > - if (!d->evlist_streams)
> > + if (!d->evlist_streams) {
> > + ret = -ENOMEM;
> > goto out_delete;
> > + }
> > }
> > }
> >
> > --
> > 2.26.0.106.g9fadedd
> >
> >

--

- Arnaldo

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