diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-06-11 08:04:33 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-10 01:59:58 +0200 |
commit | 8a26af30ff55bec82443e718e26efd6b3a8bba83 (patch) | |
tree | a9bcc4c71db27244ed9a2e7a686cb6b5bc2c9739 /drivers/char/xilinx_hwicap | |
parent | bsr: avoid format string leaking into device name (diff) | |
download | linux-8a26af30ff55bec82443e718e26efd6b3a8bba83.tar.xz linux-8a26af30ff55bec82443e718e26efd6b3a8bba83.zip |
char: xilinx_hwicap: missing error code if ioremap() fails
Return -ENOMEM instead of success if ioremap() fails.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/char/xilinx_hwicap')
-rw-r--r-- | drivers/char/xilinx_hwicap/xilinx_hwicap.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/char/xilinx_hwicap/xilinx_hwicap.c b/drivers/char/xilinx_hwicap/xilinx_hwicap.c index f6345f932e46..9b1a5ac4881d 100644 --- a/drivers/char/xilinx_hwicap/xilinx_hwicap.c +++ b/drivers/char/xilinx_hwicap/xilinx_hwicap.c @@ -661,6 +661,7 @@ static int hwicap_setup(struct device *dev, int id, drvdata->base_address = ioremap(drvdata->mem_start, drvdata->mem_size); if (!drvdata->base_address) { dev_err(dev, "ioremap() failed\n"); + retval = -ENOMEM; goto failed2; } |