i2c: 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> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
f4a18312f4
commit
84dbf809fb
@@ -308,10 +308,9 @@ static int i2c_sirfsoc_probe(struct platform_device *pdev)
|
||||
goto out;
|
||||
}
|
||||
|
||||
siic->base = devm_request_and_ioremap(&pdev->dev, mem_res);
|
||||
if (siic->base == NULL) {
|
||||
dev_err(&pdev->dev, "IO remap failed!\n");
|
||||
err = -ENOMEM;
|
||||
siic->base = devm_ioremap_resource(&pdev->dev, mem_res);
|
||||
if (IS_ERR(siic->base)) {
|
||||
err = PTR_ERR(siic->base);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user