mtd: Convert to devm_ioremap_resource()
Convert all uses of devm_request_and_ioremap() to the newly introduced devm_ioremap_resource() which provides more consistent error handling. devm_ioremap_resource() provides its own error messages so all explicit error messages can be removed from the failure code paths. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
a3e2cd7f24
commit
b0de774c63
@@ -952,10 +952,9 @@ static int s3c24xx_nand_probe(struct platform_device *pdev)
|
||||
info->platform = plat;
|
||||
info->cpu_type = cpu_type;
|
||||
|
||||
info->regs = devm_request_and_ioremap(&pdev->dev, res);
|
||||
if (info->regs == NULL) {
|
||||
dev_err(&pdev->dev, "cannot reserve register region\n");
|
||||
err = -EIO;
|
||||
info->regs = devm_ioremap_resource(&pdev->dev, res);
|
||||
if (IS_ERR(info->regs)) {
|
||||
err = PTR_ERR(info->regs);
|
||||
goto exit_error;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user