* [PATCH v2] staging: most: return error value
@ 2016-02-08 17:25 Sudip Mukherjee
0 siblings, 0 replies; only message in thread
From: Sudip Mukherjee @ 2016-02-08 17:25 UTC (permalink / raw)
To: Greg Kroah-Hartman, Christian Gromm; +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>
---
v2: sent after rebasing
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 3a2dbf1..de4f76a 100644
--- a/drivers/staging/most/aim-cdev/cdev.c
+++ b/drivers/staging/most/aim-cdev/cdev.c
@@ -470,8 +470,8 @@ static int aim_probe(struct most_interface *iface, int channel_id,
NULL,
"%s", name);
- retval = IS_ERR(c->dev);
- if (retval) {
+ if (IS_ERR(c->dev)) {
+ retval = PTR_ERR(c->dev);
pr_info("failed to create new device node %s\n", name);
goto error_create_device;
}
--
1.9.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-02-08 17:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-08 17:25 [PATCH v2] staging: most: return error value 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®