Commit 0e2cebd
platform/mellanox: mlxbf-pmc: Use kstrtobool() to check 0/1 input
For setting the enable value, the input should be 0 or 1 only. Use
kstrtobool() in place of kstrtoint() in mlxbf_pmc_enable_store() to
accept only valid input.
Fixes: 423c336 ("platform/mellanox: mlxbf-pmc: Add support for BlueField-3")
Signed-off-by: Shravan Kumar Ramani <shravankr@nvidia.com>
Reviewed-by: David Thompson <davthompson@nvidia.com>
Link: https://lore.kernel.org/r/2ee618c59976bcf1379d5ddce2fc60ab5014b3a9.1751380187.git.shravankr@nvidia.com
[ij: split kstrbool() change to own commit.]
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>1 parent f8c1311 commit 0e2cebd
1 file changed
Lines changed: 4 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1890 | 1890 | | |
1891 | 1891 | | |
1892 | 1892 | | |
1893 | | - | |
| 1893 | + | |
1894 | 1894 | | |
1895 | 1895 | | |
| 1896 | + | |
1896 | 1897 | | |
1897 | 1898 | | |
1898 | 1899 | | |
1899 | | - | |
| 1900 | + | |
1900 | 1901 | | |
1901 | 1902 | | |
1902 | 1903 | | |
| |||
1916 | 1917 | | |
1917 | 1918 | | |
1918 | 1919 | | |
1919 | | - | |
1920 | | - | |
1921 | | - | |
1922 | 1920 | | |
1923 | 1921 | | |
1924 | 1922 | | |
1925 | 1923 | | |
1926 | | - | |
| 1924 | + | |
1927 | 1925 | | |
1928 | 1926 | | |
1929 | 1927 | | |
| |||
0 commit comments