Hi everybody:
  Can any one review it?

On 2020/11/24 18:36, Zhen Lei wrote:
> An appropriate return value should be set on the failed path.
> 
> Reported-by: Hulk Robot <hul...@huawei.com>
> Signed-off-by: Zhen Lei <thunder.leiz...@huawei.com>
> ---
>  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;
> +                     }
>               }
>       }
>  
> 

Reply via email to