Commit e1fce56
pstore/ram: Fix error return code in ramoops_probe()
In the if (dev_of_node(dev) && !pdata) path, the "err" may be assigned a
value of 0, so the error return code -EINVAL may be incorrectly set
to 0. To fix set valid return code before calling to goto.
Fixes: 35da609 ("pstore/ram: add Device Tree bindings")
Signed-off-by: Wang Yufen <[email protected]>
Signed-off-by: Kees Cook <[email protected]>
Link: https://lore.kernel.org/r/[email protected]1 parent 38b9184 commit e1fce56
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
745 | 745 | | |
746 | 746 | | |
747 | 747 | | |
| 748 | + | |
748 | 749 | | |
749 | 750 | | |
750 | 751 | | |
751 | 752 | | |
752 | 753 | | |
753 | 754 | | |
754 | 755 | | |
| 756 | + | |
755 | 757 | | |
756 | 758 | | |
757 | 759 | | |
| |||
0 commit comments