[PATCH] staging: xillybus: Return -EIO if *_iomap fails, instead of 0

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

 



This patch replicates the correction made by Wei Yongjun on a second
occurrence of the same bug.

The first correction was in commit 8eec4555511bfa1f8a2e0a2de45c988fd30c3efb.

Bug fixed: The error code was not set, so the error condition wasn't reflected
in the return value.

Reported-by: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>
Signed-off-by: Eli Billauer <eli.billauer@xxxxxxxxx>
---
 drivers/staging/xillybus/xillybus_of.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/xillybus/xillybus_of.c b/drivers/staging/xillybus/xillybus_of.c
index 394bfea..3b25b0e 100644
--- a/drivers/staging/xillybus/xillybus_of.c
+++ b/drivers/staging/xillybus/xillybus_of.c
@@ -131,10 +131,10 @@ static int xilly_drv_probe(struct platform_device *op)
 	}
 
 	endpoint->registers = of_iomap(dev->of_node, 0);
-
 	if (!endpoint->registers) {
 		dev_err(endpoint->dev,
 			"Failed to map I/O memory. Aborting.\n");
+		rc = -EIO;
 		goto failed_iomap0;
 	}
 
-- 
1.7.2.3

_______________________________________________
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