diff options
author | Dan Noe <dpn@isomerica.net> | 2008-04-12 22:34:38 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-04-17 15:31:32 -0400 |
commit | d96a51f6b8040ef2b25b88032f23ffdb1ddba681 (patch) | |
tree | 81bd4f2e45e9d10346d685c3f1f8142cae790a1d | |
parent | 10e05f78c5566cb762ced12bf70307c60168d56e (diff) |
cxgb3: Fix __must_check warning with dev_dbg.
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 using dev_dbg, and the code continues as before. Use
of dev_dbg ensures printk is not needlessly included unless desired for
debugging.
Signed-off-by: Dan Noe <dpn@isomerica.net>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
-rw-r--r-- | drivers/net/cxgb3/cxgb3_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c index fd2e05bbb903..05e5f59e87fa 100644 --- a/drivers/net/cxgb3/cxgb3_main.c +++ b/drivers/net/cxgb3/cxgb3_main.c | |||
@@ -1014,8 +1014,8 @@ static int offload_open(struct net_device *dev) | |||
1014 | adapter->port[0]->mtu : 0xffff); | 1014 | adapter->port[0]->mtu : 0xffff); |
1015 | init_smt(adapter); | 1015 | init_smt(adapter); |
1016 | 1016 | ||
1017 | /* Never mind if the next step fails */ | 1017 | if (sysfs_create_group(&tdev->lldev->dev.kobj, &offload_attr_group)) |
1018 | sysfs_create_group(&tdev->lldev->dev.kobj, &offload_attr_group); | 1018 | dev_dbg(&dev->dev, "cannot create sysfs group\n"); |
1019 | 1019 | ||
1020 | /* Call back all registered clients */ | 1020 | /* Call back all registered clients */ |
1021 | cxgb3_add_clients(tdev); | 1021 | cxgb3_add_clients(tdev); |