> - if (ipath_verbs_register_sysfs(dev))
I would suggest modifying ipath_verbs_register_sysfs() to correctly return the
failure from device_create_file() in ret out of ipath_verbs.c:
static int ipath_verbs_register_sysfs(struct ib_device *dev)
{
int i;
int ret;
for (i = 0; i < ARRAY_SIZE(ipath_class_attributes); ++i)
if (device_create_file(&dev->dev,
<------------------------------
ipath_class_attributes[i])) {
ret = 1;
goto bail;
}
ret = 0;
bail:
return ret;
}
With that fixed the caller should assign and return ret.
The qib_verbs_register_sysfs() is fixed:
/*
* Register and create our files in /sys/class/infiniband.
*/
int qib_verbs_register_sysfs(struct qib_devdata *dd)
{
struct ib_device *dev = &dd->verbs_dev.ibdev;
int i, ret;
for (i = 0; i < ARRAY_SIZE(qib_attributes); ++i) {
ret = device_create_file(&dev->dev, qib_attributes[i]);
if (ret)
return ret;
}
return 0;
}
I will post a patch shortly for qib, which has the same ret flaw in the caller
to qib_verbs_register_sysfs(). If you want me to hit both, I can.
Mike
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html