From: Steven L. Roberts Date: Wed, 10 May 2017 15:54:12 +0000 (-0500) Subject: RDMA/hfi1: fix array termination by appending NULL to attr array X-Git-Tag: MMI-PSA29.97-13-9~4931^2~120 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c4dd4b69f55abcc8dd079f8de55d9d8c2ddbefce;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Reviewed-by: Leon Romanovsky Acked-by: Dennis Dalessandro Signed-off-by: Doug Ledford --- 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 = { }; static struct attribute *port_cc_default_attributes[] = { - &cc_prescan_attr.attr + &cc_prescan_attr.attr, + NULL }; static struct kobj_type port_cc_ktype = {