Commit ad0039d
fs/proc/vmcore: a few cleanups for vmcore_add_device_dump()
There are two cleanups for vmcore_add_device_dump(). Return -ENOMEM
directly rather than goto the label to simplify the code and use
scoped_guard() to simplify the lock/unlock code.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Su Hui <[email protected]>
Reviewed-by: Dan Carpenter <[email protected]>
Cc: Baoquan He <[email protected]>
Cc: Dave Young <[email protected]>
Cc: Suhui <[email protected]>
Cc: Vivek Goyal <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>1 parent 37d0f07 commit ad0039d
1 file changed
Lines changed: 12 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1490 | 1490 | | |
1491 | 1491 | | |
1492 | 1492 | | |
1493 | | - | |
1494 | | - | |
1495 | | - | |
1496 | | - | |
| 1493 | + | |
| 1494 | + | |
1497 | 1495 | | |
1498 | 1496 | | |
1499 | 1497 | | |
| |||
1519 | 1517 | | |
1520 | 1518 | | |
1521 | 1519 | | |
1522 | | - | |
1523 | | - | |
1524 | | - | |
1525 | | - | |
1526 | | - | |
1527 | | - | |
1528 | | - | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
1529 | 1527 | | |
1530 | | - | |
1531 | | - | |
1532 | | - | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
1533 | 1531 | | |
1534 | 1532 | | |
1535 | | - | |
1536 | | - | |
1537 | | - | |
1538 | 1533 | | |
1539 | 1534 | | |
1540 | 1535 | | |
| |||
0 commit comments