drm/imx/dcss: fix resource size calculation
authorDan Carpenter <dan.carpenter@linaro.org>
Tue, 13 Feb 2024 18:05:01 +0000 (21:05 +0300)
committerLaurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Wed, 28 Feb 2024 09:16:59 +0000 (09:16 +0000)
commit9cb3542aeeac31b3dd6b5a7d58b9b7d6fe9fd2bc
treeb4c47a19a76715a443443f67df369964ed1400cd
parent9fa2679b7fe1bf4e6010051767d3c163b3aee68b
drm/imx/dcss: fix resource size calculation

The resource is inclusive of the ->start and ->end addresses so this
calculation is not correct.  It should be "res->end - res->start + 1".
Use the resource_size() to do the calculation.

Fixes: 90393c9b5408 ("drm/imx/dcss: request memory region")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Link: https://patchwork.freedesktop.org/patch/msgid/4914592b-4256-4c9c-bc1d-6dec1e473831@moroto.mountain
drivers/gpu/drm/imx/dcss/dcss-dev.c