mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 02:39:48 +00:00
pata_octeon_cf: use resource_size(), to fix resource sizing bug
It appears the size for cs1 is calculated using the wrong resource. Use the function resource_size to get the correct value. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
This commit is contained in:
parent
0cdd6eb7e0
commit
4716eaf20f
1 changed files with 1 additions and 1 deletions
|
@ -853,7 +853,7 @@ static int __devinit octeon_cf_probe(struct platform_device *pdev)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
cs1 = devm_ioremap_nocache(&pdev->dev, res_cs1->start,
|
cs1 = devm_ioremap_nocache(&pdev->dev, res_cs1->start,
|
||||||
res_cs0->end - res_cs1->start + 1);
|
resource_size(res_cs1));
|
||||||
|
|
||||||
if (!cs1)
|
if (!cs1)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
Loading…
Reference in a new issue