Commit 8a1fbb64 authored by Shravan Kumar Ramani's avatar Shravan Kumar Ramani Committed by Greg Kroah-Hartman
Browse files

platform/mellanox: mlxbf-pmc: Use kstrtobool() to check 0/1 input



[ Upstream commit 0e2cebd7 ]

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: 423c3361 ("platform/mellanox: mlxbf-pmc: Add support for BlueField-3")
Signed-off-by: default avatarShravan Kumar Ramani <shravankr@nvidia.com>
Reviewed-by: default avatarDavid 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: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent d38e1e0a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment