Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 233440
b: refs/heads/master
c: 843635e
h: refs/heads/master
v: v3
  • Loading branch information
Casey Leedom authored and David S. Miller committed Feb 15, 2011
1 parent 40b527b commit 2be7e84
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bb14a1af86d01f66dc9620725ac00a240331afec
refs/heads/master: 843635e0349be9e318be224d6241069a40e23320
16 changes: 8 additions & 8 deletions trunk/drivers/net/cxgb4vf/cxgb4vf_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2040,7 +2040,7 @@ static int __devinit setup_debugfs(struct adapter *adapter)
{
int i;

BUG_ON(adapter->debugfs_root == NULL);
BUG_ON(IS_ERR_OR_NULL(adapter->debugfs_root));

/*
* Debugfs support is best effort.
Expand All @@ -2061,7 +2061,7 @@ static int __devinit setup_debugfs(struct adapter *adapter)
*/
static void cleanup_debugfs(struct adapter *adapter)
{
BUG_ON(adapter->debugfs_root == NULL);
BUG_ON(IS_ERR_OR_NULL(adapter->debugfs_root));

/*
* Unlike our sister routine cleanup_proc(), we don't need to remove
Expand Down Expand Up @@ -2700,11 +2700,11 @@ static int __devinit cxgb4vf_pci_probe(struct pci_dev *pdev,
/*
* Set up our debugfs entries.
*/
if (cxgb4vf_debugfs_root) {
if (!IS_ERR_OR_NULL(cxgb4vf_debugfs_root)) {
adapter->debugfs_root =
debugfs_create_dir(pci_name(pdev),
cxgb4vf_debugfs_root);
if (adapter->debugfs_root == NULL)
if (IS_ERR_OR_NULL(adapter->debugfs_root))
dev_warn(&pdev->dev, "could not create debugfs"
" directory");
else
Expand Down Expand Up @@ -2759,7 +2759,7 @@ static int __devinit cxgb4vf_pci_probe(struct pci_dev *pdev,
*/

err_free_debugfs:
if (adapter->debugfs_root) {
if (!IS_ERR_OR_NULL(adapter->debugfs_root)) {
cleanup_debugfs(adapter);
debugfs_remove_recursive(adapter->debugfs_root);
}
Expand Down Expand Up @@ -2828,7 +2828,7 @@ static void __devexit cxgb4vf_pci_remove(struct pci_dev *pdev)
/*
* Tear down our debugfs entries.
*/
if (adapter->debugfs_root) {
if (!IS_ERR_OR_NULL(adapter->debugfs_root)) {
cleanup_debugfs(adapter);
debugfs_remove_recursive(adapter->debugfs_root);
}
Expand Down Expand Up @@ -2916,12 +2916,12 @@ static int __init cxgb4vf_module_init(void)

/* Debugfs support is optional, just warn if this fails */
cxgb4vf_debugfs_root = debugfs_create_dir(KBUILD_MODNAME, NULL);
if (!cxgb4vf_debugfs_root)
if (IS_ERR_OR_NULL(cxgb4vf_debugfs_root))
printk(KERN_WARNING KBUILD_MODNAME ": could not create"
" debugfs entry, continuing\n");

ret = pci_register_driver(&cxgb4vf_driver);
if (ret < 0)
if (ret < 0 && !IS_ERR_OR_NULL(cxgb4vf_debugfs_root))
debugfs_remove(cxgb4vf_debugfs_root);
return ret;
}
Expand Down

0 comments on commit 2be7e84

Please sign in to comment.