diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c index 437192e43006d49db726c828aace74062ed3929c..4a938860fec0210a052c4d6c9e9879604fdc9a12 100644 --- a/drivers/misc/sram.c +++ b/drivers/misc/sram.c @@ -50,9 +50,10 @@ static int sram_probe(struct platform_device *pdev) size = resource_size(res); - virt_base = devm_request_and_ioremap(&pdev->dev, res); - if (!virt_base) - return -EADDRNOTAVAIL; + virt_base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(virt_base)) + return PTR_ERR(virt_base); + sram = devm_kzalloc(&pdev->dev, sizeof(*sram), GFP_KERNEL); if (!sram)