staging: most: remove always true comparison
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Fri, 4 Sep 2015 10:52:02 +0000 (16:22 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Sep 2015 01:24:43 +0000 (18:24 -0700)
channel->dev has already been checked for NULL and if it was NULL then
we have returned with -EPIPE. So at this point it can not be NULL.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/most/aim-cdev/cdev.c

index b0a9a4a1225cbab24a77263ec135bea84c53c3a0..1a17e2af6a607ecad65928a5ca9ba4694a053648 100644 (file)
@@ -166,7 +166,7 @@ static ssize_t aim_write(struct file *filp, const char __user *buf,
 
        mbo = most_get_mbo(channel->iface, channel->channel_id);
 
-       if (!mbo && channel->dev) {
+       if (!mbo) {
                if ((filp->f_flags & O_NONBLOCK))
                        return -EAGAIN;
                if (wait_event_interruptible(