summaryrefslogtreecommitdiffstats
path: root/drivers/parport
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2015-10-28 14:41:38 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-01-03 16:32:59 -0800
commitb95b9d6cdecabfd99e074d6fda51dc962fd2a1cf (patch)
tree9fd99a1bfb9fb2cb362dfc45fd7376779a3da6a0 /drivers/parport
parent47ec57ec0e52839b92066567e6eb02fb1e60e603 (diff)
downloadop-kernel-dev-b95b9d6cdecabfd99e074d6fda51dc962fd2a1cf.zip
op-kernel-dev-b95b9d6cdecabfd99e074d6fda51dc962fd2a1cf.tar.gz
parport: change style of NULL comparison
checkpatch was complaining about NULL comparisons. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/parport')
-rw-r--r--drivers/parport/share.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/parport/share.c b/drivers/parport/share.c
index 441333b..ccd7df4 100644
--- a/drivers/parport/share.c
+++ b/drivers/parport/share.c
@@ -738,11 +738,11 @@ parport_register_device(struct parport *port, const char *name,
parport_get_port (port);
tmp = kmalloc(sizeof(struct pardevice), GFP_KERNEL);
- if (tmp == NULL)
+ if (!tmp)
goto out;
tmp->state = kmalloc(sizeof(struct parport_state), GFP_KERNEL);
- if (tmp->state == NULL)
+ if (!tmp->state)
goto out_free_pardevice;
tmp->name = name;
@@ -971,7 +971,7 @@ void parport_unregister_device(struct pardevice *dev)
struct parport *port;
#ifdef PARPORT_PARANOID
- if (dev == NULL) {
+ if (!dev) {
printk(KERN_ERR "parport_unregister_device: passed NULL\n");
return;
}
@@ -1345,7 +1345,7 @@ void parport_release(struct pardevice *dev)
* interested in being woken up. (Note: no locking required)
*/
/* !!! LOCKING IS NEEDED HERE */
- for (pd = port->devices; (port->cad == NULL) && pd; pd = pd->next) {
+ for (pd = port->devices; !port->cad && pd; pd = pd->next) {
if (pd->wakeup && pd != dev)
pd->wakeup(pd->private);
}
OpenPOWER on IntegriCloud