diff options
author | Steven L. Roberts <robers97@gmail.com> | 2017-05-10 11:54:12 -0400 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-06-01 17:03:19 -0400 |
commit | c4dd4b69f55abcc8dd079f8de55d9d8c2ddbefce (patch) | |
tree | 1a13d008255c923ebaef205e82491995d1837024 | |
parent | 98b80a2a73a26f0e259632da519ccedb0cf37617 (diff) |
RDMA/hfi1: fix array termination by appending NULL to attr array
This fixes a kernel panic when loading the hfi driver as a dynamic module.
Signed-off-by: Steven L Roberts <robers97@gmail.com>
Reviewed-by: Leon Romanovsky <leon@kernel.org>
Acked-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r-- | drivers/infiniband/hw/hfi1/sysfs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/hfi1/sysfs.c b/drivers/infiniband/hw/hfi1/sysfs.c index 50d140d25e38..2f3bbcac1e34 100644 --- a/drivers/infiniband/hw/hfi1/sysfs.c +++ b/drivers/infiniband/hw/hfi1/sysfs.c | |||
@@ -196,7 +196,8 @@ static const struct sysfs_ops port_cc_sysfs_ops = { | |||
196 | }; | 196 | }; |
197 | 197 | ||
198 | static struct attribute *port_cc_default_attributes[] = { | 198 | static struct attribute *port_cc_default_attributes[] = { |
199 | &cc_prescan_attr.attr | 199 | &cc_prescan_attr.attr, |
200 | NULL | ||
200 | }; | 201 | }; |
201 | 202 | ||
202 | static struct kobj_type port_cc_ktype = { | 203 | static struct kobj_type port_cc_ktype = { |