mei: mei_release: drop redundant check if cb is NULL
authorTomas Winkler <tomas.winkler@intel.com>
Sun, 15 Sep 2013 15:11:06 +0000 (18:11 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Sep 2013 15:39:27 +0000 (08:39 -0700)
mei_io_cb_free follows kfree design and check for NULL internally

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/main.c

index 7404584e65e1d5de6d2409dad794870aaa5a8c55..9aa3b78067d3da9bc29f85f114c823f7ac06f2a3 100644 (file)
@@ -165,10 +165,7 @@ static int mei_release(struct inode *inode, struct file *file)
 
        file->private_data = NULL;
 
-       if (cb) {
-               mei_io_cb_free(cb);
-               cb = NULL;
-       }
+       mei_io_cb_free(cb);
 
        kfree(cl);
 out: