diff options
author | Dafna Hirschfeld <dhirschfeld@habana.ai> | 2022-05-19 10:54:30 +0300 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2022-07-12 09:09:21 +0300 |
commit | 78d503087be190eab36290644ccec050135e7c70 (patch) | |
tree | fb2bd683e28803723dee559e7c0386f9cd254338 /drivers/misc/habanalabs/goya | |
parent | 18b67315388cb528479050839c69d245164f6183 (diff) | |
download | linux-78d503087be190eab36290644ccec050135e7c70.tar.xz |
habanalabs: add terminating NULL to attrs arrays
Arrays of struct attribute are expected to be NULL terminated.
This is required by API methods such as device_add_groups.
This fixes a crash when loading the driver for Goya device.
Signed-off-by: Dafna Hirschfeld <dhirschfeld@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc/habanalabs/goya')
-rw-r--r-- | drivers/misc/habanalabs/goya/goya_hwmgr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/misc/habanalabs/goya/goya_hwmgr.c b/drivers/misc/habanalabs/goya/goya_hwmgr.c index 6580fc6a486a..b595721751c1 100644 --- a/drivers/misc/habanalabs/goya/goya_hwmgr.c +++ b/drivers/misc/habanalabs/goya/goya_hwmgr.c @@ -359,6 +359,7 @@ static struct attribute *goya_clk_dev_attrs[] = { &dev_attr_pm_mng_profile.attr, &dev_attr_tpc_clk.attr, &dev_attr_tpc_clk_curr.attr, + NULL, }; static ssize_t infineon_ver_show(struct device *dev, struct device_attribute *attr, char *buf) @@ -375,6 +376,7 @@ static DEVICE_ATTR_RO(infineon_ver); static struct attribute *goya_vrm_dev_attrs[] = { &dev_attr_infineon_ver.attr, + NULL, }; void goya_add_device_attr(struct hl_device *hdev, struct attribute_group *dev_clk_attr_grp, |