Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Dan Carpenter and committed by
Greg Kroah-Hartman
8a26af30 4171ee9e

+1
+1
drivers/char/xilinx_hwicap/xilinx_hwicap.c
··· 661 661 drvdata->base_address = ioremap(drvdata->mem_start, drvdata->mem_size); 662 662 if (!drvdata->base_address) { 663 663 dev_err(dev, "ioremap() failed\n"); 664 + retval = -ENOMEM; 664 665 goto failed2; 665 666 } 666 667