[openib-general] [PATCH] [TRIVIAL] ib_mad.c: change clearing of management method table
Hal Rosenstock
halr at voltaire.com
Fri Sep 10 11:57:46 PDT 2004
ib_mad.c: change clearing of management method table
Index: ib_mad.c
===================================================================
--- ib_mad.c (revision 760)
+++ ib_mad.c (working copy)
@@ -413,8 +413,6 @@
static int allocate_method_table(struct ib_mad_mgmt_method_table
**method)
{
- int i;
-
/* Allocate management method table */
*method = kmalloc(sizeof **method, GFP_KERNEL);
if (!*method) {
@@ -422,9 +420,8 @@
return ENOMEM;
}
/* Clear management method table */
- for (i = 0; i < IB_MGMT_MAX_METHODS; i++) {
- (*method)->agent[i] = NULL;
- }
+ memset(*method, 0, sizeof **method);
+
return 0;
}
More information about the general
mailing list