From 4c36fdde64f858ce167ad69859c89b1a8c9b6fb0 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Wed, 4 Mar 2015 12:15:41 -0700 Subject: [PATCH] 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 --- drivers/staging/comedi/kcomedilib/kcomedilib_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.30.2