Commit dbfb302
perf trace: Avoid an ERR_PTR in syscall_stats
[ Upstream commit d05073a ]
hashmap__new may return an ERR_PTR and previously this would be
assigned to syscall_stats meaning all use of syscall_stats needs to
test for NULL (uninitialized) or an ERR_PTR. Given the only reason
hashmap__new can fail is ENOMEM, just use NULL to indicate the
allocation failure and avoid the code having to test for NULL and
IS_ERR.
Fixes: 96f202e (perf trace: Fix IS_ERR() vs NULL check bug)
Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent 4d994ff commit dbfb302
1 file changed
Lines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1565 | 1565 | | |
1566 | 1566 | | |
1567 | 1567 | | |
1568 | | - | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
1569 | 1571 | | |
1570 | 1572 | | |
1571 | 1573 | | |
1572 | 1574 | | |
1573 | 1575 | | |
1574 | 1576 | | |
1575 | 1577 | | |
1576 | | - | |
| 1578 | + | |
1577 | 1579 | | |
1578 | 1580 | | |
1579 | 1581 | | |
| |||
1589 | 1591 | | |
1590 | 1592 | | |
1591 | 1593 | | |
1592 | | - | |
| 1594 | + | |
1593 | 1595 | | |
1594 | 1596 | | |
1595 | 1597 | | |
| |||
4441 | 4443 | | |
4442 | 4444 | | |
4443 | 4445 | | |
4444 | | - | |
| 4446 | + | |
4445 | 4447 | | |
4446 | 4448 | | |
4447 | 4449 | | |
| |||
4749 | 4751 | | |
4750 | 4752 | | |
4751 | 4753 | | |
4752 | | - | |
| 4754 | + | |
4753 | 4755 | | |
4754 | 4756 | | |
4755 | 4757 | | |
| |||
0 commit comments