Commit 4716eaf20f37d10fd01b0fcacb3e41c1abd362c3

Authored by H Hartley Sweeten
Committed by Jeff Garzik
1 parent 0cdd6eb7e0

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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

drivers/ata/pata_octeon_cf.c
... ... @@ -853,7 +853,7 @@
853 853 return -EINVAL;
854 854  
855 855 cs1 = devm_ioremap_nocache(&pdev->dev, res_cs1->start,
856   - res_cs0->end - res_cs1->start + 1);
  856 + resource_size(res_cs1));
857 857  
858 858 if (!cs1)
859 859 return -ENOMEM;