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 <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
a9c2520818
commit
858e1a27c1
@ -173,7 +173,7 @@ static ssize_t aim_write(struct file *filp, const char __user *buf,
|
|||||||
channel->wq,
|
channel->wq,
|
||||||
(mbo = most_get_mbo(channel->iface,
|
(mbo = most_get_mbo(channel->iface,
|
||||||
channel->channel_id)) ||
|
channel->channel_id)) ||
|
||||||
(channel->dev == NULL)))
|
(!channel->dev)))
|
||||||
return -ERESTARTSYS;
|
return -ERESTARTSYS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -229,12 +229,12 @@ aim_read(struct file *filp, char __user *buf, size_t count, loff_t *offset)
|
|||||||
goto start_copy;
|
goto start_copy;
|
||||||
}
|
}
|
||||||
while ((0 == kfifo_out(&channel->fifo, &mbo, 1))
|
while ((0 == kfifo_out(&channel->fifo, &mbo, 1))
|
||||||
&& (channel->dev != NULL)) {
|
&& (channel->dev)) {
|
||||||
if (filp->f_flags & O_NONBLOCK)
|
if (filp->f_flags & O_NONBLOCK)
|
||||||
return -EAGAIN;
|
return -EAGAIN;
|
||||||
if (wait_event_interruptible(channel->wq,
|
if (wait_event_interruptible(channel->wq,
|
||||||
(!kfifo_is_empty(&channel->fifo) ||
|
(!kfifo_is_empty(&channel->fifo) ||
|
||||||
(channel->dev == NULL))))
|
(!channel->dev))))
|
||||||
return -ERESTARTSYS;
|
return -ERESTARTSYS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -299,7 +299,7 @@ static int aim_disconnect_channel(struct most_interface *iface, int channel_id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
channel = get_channel(iface, channel_id);
|
channel = get_channel(iface, channel_id);
|
||||||
if (channel == NULL)
|
if (!channel)
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
|
|
||||||
mutex_lock(&channel->io_mutex);
|
mutex_lock(&channel->io_mutex);
|
||||||
@ -336,7 +336,7 @@ static int aim_rx_completion(struct mbo *mbo)
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
channel = get_channel(mbo->ifp, mbo->hdm_channel_id);
|
channel = get_channel(mbo->ifp, mbo->hdm_channel_id);
|
||||||
if (channel == NULL)
|
if (!channel)
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
|
|
||||||
kfifo_in(&channel->fifo, &mbo, 1);
|
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);
|
channel = get_channel(iface, channel_id);
|
||||||
if (channel == NULL)
|
if (!channel)
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
wake_up_interruptible(&channel->wq);
|
wake_up_interruptible(&channel->wq);
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user