mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
4171ee9e3c
commit
8a26af30ff
|
@ -661,6 +661,7 @@ static int hwicap_setup(struct device *dev, int id,
|
||||||
drvdata->base_address = ioremap(drvdata->mem_start, drvdata->mem_size);
|
drvdata->base_address = ioremap(drvdata->mem_start, drvdata->mem_size);
|
||||||
if (!drvdata->base_address) {
|
if (!drvdata->base_address) {
|
||||||
dev_err(dev, "ioremap() failed\n");
|
dev_err(dev, "ioremap() failed\n");
|
||||||
|
retval = -ENOMEM;
|
||||||
goto failed2;
|
goto failed2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue