video: 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: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
148e11349b
commit
bc3bad166c
@@ -20,6 +20,7 @@
|
||||
|
||||
/*#define DEBUG*/
|
||||
|
||||
#include <linux/err.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/ioport.h>
|
||||
@@ -357,11 +358,9 @@ static int __init vrfb_probe(struct platform_device *pdev)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
vrfb_base = devm_request_and_ioremap(&pdev->dev, mem);
|
||||
if (!vrfb_base) {
|
||||
dev_err(&pdev->dev, "can't ioremap vrfb memory\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
vrfb_base = devm_ioremap_resource(&pdev->dev, mem);
|
||||
if (IS_ERR(vrfb_base))
|
||||
return PTR_ERR(vrfb_base);
|
||||
|
||||
num_ctxs = pdev->num_resources - 1;
|
||||
|
||||
|
Reference in New Issue
Block a user