Message ID | alpine.DEB.2.20.1707200747220.2211@hadrien (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
--- a/drivers/staging/fsl-mc/bus/mc-io.c +++ b/drivers/staging/fsl-mc/bus/mc-io.c @@ -242,8 +242,7 @@ int __must_check fsl_mc_portal_allocate( goto error_cleanup_resource; mc_portal_phys_addr = dpmcp_dev->regions[0].start; - mc_portal_size = dpmcp_dev->regions[0].end - - dpmcp_dev->regions[0].start + 1; + mc_portal_size = resource_size(dpmcp_dev->regions); if (WARN_ON(mc_portal_size != mc_bus_dev->mc_io->portal_size)) goto error_cleanup_resource;