From 858e1a27c1c58f5a1dd0ba58ce28c80bf5095d0b Mon Sep 17 00:00:00 2001 From: Sudip Mukherjee Date: Mon, 24 Aug 2015 19:19:32 +0530 Subject: [PATCH] staging: most: NULL comparison style checkpatch complains when a variable comparison to NULL is written as: variable == NULL or variable != NULL. Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman --- drivers/staging/most/aim-cdev/cdev.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/most/aim-cdev/cdev.c b/drivers/staging/most/aim-cdev/cdev.c index 2bc877c5c84d..b0a9a4a1225c 100644 --- a/drivers/staging/most/aim-cdev/cdev.c +++ b/drivers/staging/most/aim-cdev/cdev.c @@ -173,7 +173,7 @@ static ssize_t aim_write(struct file *filp, const char __user *buf, channel->wq, (mbo = most_get_mbo(channel->iface, channel->channel_id)) || - (channel->dev == NULL))) + (!channel->dev))) return -ERESTARTSYS; } @@ -229,12 +229,12 @@ aim_read(struct file *filp, char __user *buf, size_t count, loff_t *offset) goto start_copy; } while ((0 == kfifo_out(&channel->fifo, &mbo, 1)) - && (channel->dev != NULL)) { + && (channel->dev)) { if (filp->f_flags & O_NONBLOCK) return -EAGAIN; if (wait_event_interruptible(channel->wq, (!kfifo_is_empty(&channel->fifo) || - (channel->dev == NULL)))) + (!channel->dev)))) return -ERESTARTSYS; } @@ -299,7 +299,7 @@ static int aim_disconnect_channel(struct most_interface *iface, int channel_id) } channel = get_channel(iface, channel_id); - if (channel == NULL) + if (!channel) return -ENXIO; mutex_lock(&channel->io_mutex); @@ -336,7 +336,7 @@ static int aim_rx_completion(struct mbo *mbo) return -EINVAL; channel = get_channel(mbo->ifp, mbo->hdm_channel_id); - if (channel == NULL) + if (!channel) return -ENXIO; kfifo_in(&channel->fifo, &mbo, 1); @@ -369,7 +369,7 @@ static int aim_tx_completion(struct most_interface *iface, int channel_id) } channel = get_channel(iface, channel_id); - if (channel == NULL) + if (!channel) return -ENXIO; wake_up_interruptible(&channel->wq); return 0; -- 2.39.5