[PATCH 1/2] staging: most: return error value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

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

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux