[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1207107342276-git-send-email-dpn@isomerica.net>
Date: Tue, 1 Apr 2008 23:35:42 -0400
From: Dan Noe <dpn@...merica.net>
To: netdev@...r.kernel.org
Cc: Dan Noe <dpn@...merica.net>
Subject: [PATCH] cxgb3: Fix __must_check warning.
Fix the warning:
drivers/net/cxgb3/cxgb3_main.c: In function ‘offload_open’:
drivers/net/cxgb3/cxgb3_main.c:936: warning: ignoring return value of ‘sysfs_create_group’, declared with attribute warn_unused_result
Now the return value is checked; if sysfs_create_group() returns failure,
a warning is printed, and the code continues as before.
Signed-off-by: Dan Noe <dpn@...merica.net>
---
drivers/net/cxgb3/cxgb3_main.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
My first patch - feedback is appreciated, please be gentle. Thanks!
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
index fd2e05b..3007fe1 100644
--- a/drivers/net/cxgb3/cxgb3_main.c
+++ b/drivers/net/cxgb3/cxgb3_main.c
@@ -1015,7 +1015,8 @@ static int offload_open(struct net_device *dev)
init_smt(adapter);
/* Never mind if the next step fails */
- sysfs_create_group(&tdev->lldev->dev.kobj, &offload_attr_group);
+ if (sysfs_create_group(&tdev->lldev->dev.kobj, &offload_attr_group))
+ printk(KERN_WARNING DRV_NAME ": cannot create sysfs group\n");
/* Call back all registered clients */
cxgb3_add_clients(tdev);
--
1.5.2.5
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists