summaryrefslogtreecommitdiff
path: root/drivers/misc/habanalabs
diff options
context:
space:
mode:
authorOded Gabbay <oded.gabbay@gmail.com>2019-02-28 10:46:23 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-02-28 13:07:52 +0100
commit70496af9b25d53722f8298b714a4d3b0516d82d9 (patch)
treed1095b8bae8a7915b59d828d43a33e9d154d949f /drivers/misc/habanalabs
parentdf697bce61cee1f6c0d43306fcb1c8c37ca570a0 (diff)
habanalabs: use NULL to initialize array of pointers
This patch fixes the following sparse warnings: drivers/misc/habanalabs/hwmon.c:20:56: warning: Using plain integer as NULL pointer Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/habanalabs')
-rw-r--r--drivers/misc/habanalabs/hwmon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/habanalabs/hwmon.c b/drivers/misc/habanalabs/hwmon.c
index 7eec21f9b96e..af81084ef495 100644
--- a/drivers/misc/habanalabs/hwmon.c
+++ b/drivers/misc/habanalabs/hwmon.c
@@ -17,7 +17,7 @@ int hl_build_hwmon_channel_info(struct hl_device *hdev,
struct armcp_sensor *sensors_arr)
{
u32 counts[HWMON_NR_SENSOR_TYPES] = {0};
- u32 *sensors_by_type[HWMON_NR_SENSOR_TYPES] = {0};
+ u32 *sensors_by_type[HWMON_NR_SENSOR_TYPES] = {NULL};
u32 sensors_by_type_next_index[HWMON_NR_SENSOR_TYPES] = {0};
struct hwmon_channel_info **channels_info;
u32 num_sensors_for_type, num_active_sensor_types = 0,