Skip to content

Commit

Permalink
pata_octeon_cf: use resource_size(), to fix resource sizing bug
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
H Hartley Sweeten authored and Jeff Garzik committed Dec 17, 2009
1 parent 0cdd6eb commit 4716eaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/ata/pata_octeon_cf.c
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ static int __devinit octeon_cf_probe(struct platform_device *pdev)
return -EINVAL;

cs1 = devm_ioremap_nocache(&pdev->dev, res_cs1->start,
res_cs0->end - res_cs1->start + 1);
resource_size(res_cs1));

if (!cs1)
return -ENOMEM;
Expand Down

0 comments on commit 4716eaf

Please sign in to comment.