]> git.karo-electronics.de Git - linux-beck.git/commitdiff
i5100_edac: Remove two checkpatch warnings
authorMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 21 Feb 2013 14:01:23 +0000 (11:01 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 21 Feb 2013 14:06:34 +0000 (11:06 -0300)
The last changeset introduced a few checkpatch warnings:

WARNING: debugfs_remove_recursive(NULL) is safe this check is probably not required
261: FILE: drivers/edac/i5100_edac.c:1207:
+       if (priv->debugfs)
+               debugfs_remove_recursive(priv->debugfs);

WARNING: debugfs_remove(NULL) is safe this check is probably not required
290: FILE: drivers/edac/i5100_edac.c:1250:
+       if (i5100_debugfs)
+               debugfs_remove(i5100_debugfs);

Get rid of them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/edac/i5100_edac.c

index ad4cc898dc60e69827d7fcd40cbc045b0414ebbf..6ed11b1881b7ccb1f1f873787ebd0188067d2445 100644 (file)
@@ -1203,8 +1203,7 @@ static void i5100_remove_one(struct pci_dev *pdev)
 
        priv = mci->pvt_info;
 
-       if (priv->debugfs)
-               debugfs_remove_recursive(priv->debugfs);
+       debugfs_remove_recursive(priv->debugfs);
 
        priv->scrub_enable = 0;
        cancel_delayed_work_sync(&(priv->i5100_scrubbing));
@@ -1246,8 +1245,7 @@ static int __init i5100_init(void)
 
 static void __exit i5100_exit(void)
 {
-       if (i5100_debugfs)
-               debugfs_remove(i5100_debugfs);
+       debugfs_remove(i5100_debugfs);
 
        pci_unregister_driver(&i5100_driver);
 }