staging: comedi: kcomedilib_main: (!foo) preferred over (foo == NULL)
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 4 Mar 2015 19:15:41 +0000 (12:15 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Mar 2015 00:01:30 +0000 (16:01 -0800)
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/kcomedilib/kcomedilib_main.c

index 973f544e85e1aaa5f457c7fe79735d2feae50189..76bf5619fdd522f121793b994331236268298c0b 100644 (file)
@@ -58,7 +58,7 @@ struct comedi_device *comedi_open(const char *filename)
                retval = NULL;
        up_read(&dev->attach_lock);
 
-       if (retval == NULL)
+       if (!retval)
                comedi_dev_put(dev);
 
        return retval;