Commit 662a9bf
regulator: bd718x7: Use dev_err_probe()
The dev_err_probe() has (at least) following benefits over dev_err()
when printing an error print for a failed function call at a device
driver probe:
- Omit error level print if error is 'EPRBE_DEFER'
- Standardized print format for returned error
- return the error value allowing shortening calls like:
if (ret) {
dev_err(...);
return ret;
}
to
if (ret)
return dev_err_probe(...);
Convert the ROHM BD718x7 regulator driver to use the dev_err_probe() when
returned error is not hard-coded constant.
NOTE:
This commit also changes the error handling path to return immediately
from a spot where the error is spotted instead of using a single point
of exit.
Signed-off-by: Matti Vaittinen <[email protected]>
Link: https://lore.kernel.org/r/fee54c2d04bb41b51381e31523f9ed31575206d2.1669203610.git.mazziesaccount@gmail.com
Signed-off-by: Mark Brown <[email protected]>1 parent d4e93e8 commit 662a9bf
1 file changed
+19
-32
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1706 | 1706 | | |
1707 | 1707 | | |
1708 | 1708 | | |
1709 | | - | |
1710 | | - | |
| 1709 | + | |
1711 | 1710 | | |
1712 | 1711 | | |
1713 | 1712 | | |
1714 | 1713 | | |
1715 | 1714 | | |
1716 | | - | |
1717 | | - | |
1718 | | - | |
1719 | | - | |
1720 | | - | |
1721 | | - | |
1722 | | - | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
1723 | 1720 | | |
1724 | 1721 | | |
1725 | 1722 | | |
| |||
1736 | 1733 | | |
1737 | 1734 | | |
1738 | 1735 | | |
1739 | | - | |
1740 | | - | |
1741 | | - | |
1742 | | - | |
1743 | | - | |
1744 | | - | |
1745 | | - | |
| 1736 | + | |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
1746 | 1741 | | |
1747 | 1742 | | |
1748 | 1743 | | |
| |||
1778 | 1773 | | |
1779 | 1774 | | |
1780 | 1775 | | |
1781 | | - | |
1782 | | - | |
1783 | | - | |
1784 | | - | |
1785 | | - | |
1786 | | - | |
1787 | | - | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
1788 | 1780 | | |
1789 | 1781 | | |
1790 | 1782 | | |
| |||
1807 | 1799 | | |
1808 | 1800 | | |
1809 | 1801 | | |
1810 | | - | |
1811 | | - | |
| 1802 | + | |
| 1803 | + | |
1812 | 1804 | | |
1813 | 1805 | | |
1814 | | - | |
1815 | | - | |
1816 | 1806 | | |
1817 | 1807 | | |
1818 | 1808 | | |
1819 | 1809 | | |
1820 | 1810 | | |
1821 | 1811 | | |
1822 | | - | |
1823 | | - | |
| 1812 | + | |
| 1813 | + | |
1824 | 1814 | | |
1825 | 1815 | | |
1826 | | - | |
1827 | | - | |
1828 | 1816 | | |
1829 | 1817 | | |
1830 | 1818 | | |
1831 | | - | |
1832 | 1819 | | |
1833 | 1820 | | |
1834 | 1821 | | |
| |||
0 commit comments