Commit 95e4b25
platform/mellanox: mlxbf-pmc: fix sscanf() error checking
The sscanf() function never returns negatives. It returns the number of
items successfully read.
Fixes: 1a218d3 ("platform/mellanox: mlxbf-pmc: Add Mellanox BlueField PMC driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/4ccdfd28-099b-40bf-8d77-ad4ea2e76b93@kili.mountain
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>1 parent b54147f commit 95e4b25
1 file changed
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1348 | 1348 | | |
1349 | 1349 | | |
1350 | 1350 | | |
1351 | | - | |
1352 | | - | |
1353 | | - | |
| 1351 | + | |
| 1352 | + | |
1354 | 1353 | | |
1355 | 1354 | | |
1356 | 1355 | | |
| |||
0 commit comments