From: H Hartley Sweeten Date: Wed, 4 Mar 2015 19:15:41 +0000 (-0700) Subject: staging: comedi: kcomedilib_main: (!foo) preferred over (foo == NULL) X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=4c36fdde64f858ce167ad69859c89b1a8c9b6fb0;p=openwrt%2Fstaging%2Fblogic.git staging: comedi: kcomedilib_main: (!foo) preferred over (foo == NULL) Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/kcomedilib/kcomedilib_main.c b/drivers/staging/comedi/kcomedilib/kcomedilib_main.c index 973f544e85e1..76bf5619fdd5 100644 --- a/drivers/staging/comedi/kcomedilib/kcomedilib_main.c +++ b/drivers/staging/comedi/kcomedilib/kcomedilib_main.c @@ -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;