From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758824AbbIDKwR (ORCPT ); Fri, 4 Sep 2015 06:52:17 -0400 Received: from mail-pa0-f52.google.com ([209.85.220.52]:32819 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752295AbbIDKwP (ORCPT ); Fri, 4 Sep 2015 06:52:15 -0400 From: Sudip Mukherjee To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, Sudip Mukherjee Subject: [PATCH 1/5] staging: most: remove always true comparison Date: Fri, 4 Sep 2015 16:22:02 +0530 Message-Id: <1441363926-5025-1-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/staging/most/aim-cdev/cdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/most/aim-cdev/cdev.c b/drivers/staging/most/aim-cdev/cdev.c index b0a9a4a..1a17e2a 100644 --- a/drivers/staging/most/aim-cdev/cdev.c +++ b/drivers/staging/most/aim-cdev/cdev.c @@ -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( -- 1.9.1