All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] staging: most: return error value
@ 2015-11-27  7:37 Sudip Mukherjee
  2015-11-27  7:37 ` [PATCH 2/2] staging: most: avoid assignment in if Sudip Mukherjee
  2016-02-07 22:16 ` [PATCH 1/2] staging: most: return error value Greg Kroah-Hartman
  0 siblings, 2 replies; 5+ messages in thread
From: Sudip Mukherjee @ 2015-11-27  7:37 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, devel, Sudip Mukherjee

On error we were returning retval, but retval is not having the error
value. We will get the error value using PTR_ERR.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---

This series doesnot depend on my earlier pending series.

 drivers/staging/most/aim-cdev/cdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/most/aim-cdev/cdev.c b/drivers/staging/most/aim-cdev/cdev.c
index dc3fb25..3f7c8bb 100644
--- a/drivers/staging/most/aim-cdev/cdev.c
+++ b/drivers/staging/most/aim-cdev/cdev.c
@@ -468,8 +468,8 @@ static int aim_probe(struct most_interface *iface, int channel_id,
 				     NULL,
 				     "%s", name);
 
-	retval = IS_ERR(channel->dev);
-	if (retval) {
+	if (IS_ERR(channel->dev)) {
+		retval = PTR_ERR(channel->dev);
 		pr_info("failed to create new device node %s\n", name);
 		goto error_create_device;
 	}
-- 
1.9.1


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

end of thread, other threads:[~2016-02-07 22:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-27  7:37 [PATCH 1/2] staging: most: return error value Sudip Mukherjee
2015-11-27  7:37 ` [PATCH 2/2] staging: most: avoid assignment in if Sudip Mukherjee
2015-11-27  8:25   ` Dan Carpenter
2015-11-27  8:50   ` andrey.shvetsov
2016-02-07 22:16 ` [PATCH 1/2] staging: most: return error value Greg Kroah-Hartman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.