mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/5] staging: most: remove always true comparison
@ 2015-09-04 10:52 Sudip Mukherjee
  2015-09-04 10:52 ` [PATCH 2/5] staging: most: return NULL instead of integer Sudip Mukherjee
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Sudip Mukherjee @ 2015-09-04 10:52 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, devel, Sudip Mukherjee

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>
---
 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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-09-08 16:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-04 10:52 [PATCH 1/5] staging: most: remove always true comparison Sudip Mukherjee
2015-09-04 10:52 ` [PATCH 2/5] staging: most: return NULL instead of integer Sudip Mukherjee
2015-09-04 10:52 ` [PATCH 3/5] staging: most: remove driver owner Sudip Mukherjee
2015-09-07 12:13   ` Andrey Shvetsov
2015-09-07 12:46     ` Sudip Mukherjee
2015-09-08  9:56       ` Andrey Shvetsov
2015-09-08 16:48         ` Greg Kroah-Hartman
2015-09-04 10:52 ` [PATCH 4/5] staging: most: remove unneeded NULL check Sudip Mukherjee
2015-09-04 10:52 ` [PATCH 5/5] staging: most: style of bool comparison Sudip Mukherjee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®