perf diff: fix error return value in __cmd_diff()
PATCH 1/1 perf diff: fix error return value in __cmd_diff()
An appropriate return value should be set on the failed path.
--- tools/perf/builtin-diff.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
tools/perf/builtin-diff.c +3 -1
@@ -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; + } } }
Signature · 1 line
2.26.0.106.g9fadedd
Hi everybody:
Can any one review it?
Quoted 25 lines · Zhen Lei
An appropriate return value should be set on the failed path.
Reported-by Hulk Robot <[email protected]>Signed-off-by Zhen Lei <[email protected]>--- tools/perf/builtin-diff.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)tools/perf/builtin-diff.c +3
-1@@ -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; + } } }
Hello,
Quoted 5 lines · Zhen Lei
An appropriate return value should be set on the failed path.
Reported-by Hulk Robot <[email protected]>Signed-off-by Zhen Lei <[email protected]>
Thanks,
Namhyung
Quoted 24 lines
--- tools/perf/builtin-diff.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)tools/perf/builtin-diff.c +3
-2@@ -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
Em Fri, Nov 27, 2020 at 10:35:37PM +0900, Namhyung Kim escreveu:
Quoted 10 lines
Hello,
Quoted 5 lines · Zhen Lei
An appropriate return value should be set on the failed path.
Reported-by Hulk Robot <[email protected]>Signed-off-by Zhen Lei <[email protected]>Acked-by Namhyung Kim <[email protected]>
Thanks, applied.
- Arnaldo
Quoted 27 lines
Thanks,
NamhyungQuoted 24 lines
--- tools/perf/builtin-diff.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)tools/perf/builtin-diff.c +3
-2@@ -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
Signature · 1 line
- Arnaldo
Arnaldo Carvalho de Melo
maintainerEm Fri, Nov 27, 2020 at 02:22:02PM -0300, Arnaldo Carvalho de Melo escreveu:
Quoted 11 lines
Em Fri, Nov 27, 2020 at 10:35:37PM +0900, Namhyung Kim escreveu:
Quoted 8 lines · Zhen Lei
Quoted 5 lines
An appropriate return value should be set on the failed path.
Reported-by Hulk Robot <[email protected]>Signed-off-by Zhen Lei <[email protected]>Acked-by Namhyung Kim <[email protected]>Thanks, applied.
I also added this:
Please add the fixes line and CC the author of the patch introducing the bug next time,
Thanks
- Arnaldo
Quoted 13 lines · Arnaldo Carvalho de Melo
Em Fri, Nov 27, 2020 at 02:22:02PM -0300, Arnaldo Carvalho de Melo escreveu:
Quoted 11 lines
Em Fri, Nov 27, 2020 at 10:35:37PM +0900, Namhyung Kim escreveu:
Quoted 8 lines · Zhen Lei
Quoted 5 lines
An appropriate return value should be set on the failed path.
Reported-by Hulk Robot <[email protected]>Signed-off-by Zhen Lei <[email protected]>Acked-by Namhyung Kim <[email protected]>Thanks, applied.
Quoted 7 lines
I also added this:
Cc Jin Yao <[email protected]>Fixes 2a09a84c720b436a ("perf diff: Support hot streams comparison")Please add the fixes line and CC the author of the patch introducing the bug next time,
Okay, I'll do that next time. Thanks for the heads-up.
Quoted 7 lines
Thanks
- Arnaldo
.
Quoted 4 lines · Zhen Lei
An appropriate return value should be set on the failed path.
Reported-by Hulk Robot <[email protected]>Signed-off-by Zhen Lei <[email protected]>
thanks,
jirka
Quoted 24 lines
--- tools/perf/builtin-diff.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)tools/perf/builtin-diff.c +3
-1@@ -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; + } } }Signature · 1 line
2.26.0.106.g9fadedd