]> git.baikalelectronics.ru Git - kernel.git/commit
platform/mellanox: mlxbf-pmc: Fix an IS_ERR() vs NULL bug in mlxbf_pmc_map_counters
authorMiaoqian Lin <linmq006@gmail.com>
Fri, 10 Dec 2021 07:07:53 +0000 (07:07 +0000)
committerHans de Goede <hdegoede@redhat.com>
Tue, 21 Dec 2021 18:35:22 +0000 (19:35 +0100)
commit2adf9aaa1e1e3d07a0f3b785de5d6289c0048075
tree873cbf9d462bbbe8ffead21112196b17a8812170
parentb829e7282269558a22125852f0bb474d21679c65
platform/mellanox: mlxbf-pmc: Fix an IS_ERR() vs NULL bug in mlxbf_pmc_map_counters

The devm_ioremap() function returns NULL on error, it doesn't return
error pointers. Also according to doc of device_property_read_u64_array,
values in info array are properties of device or NULL.

Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20211210070753.10761-1-linmq006@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/mellanox/mlxbf-pmc.c