[PATCH 5/7] drm/stm: dsi: Remove unnecessary platform_get_resource() error check

Benjamin Gaignard benjamin.gaignard at linaro.org
Tue Dec 19 14:28:04 UTC 2017


2017-12-19 15:14 GMT+01:00 Philippe CORNU <philippe.cornu at st.com>:
> Dear Fabio,
>
> On 12/18/2017 02:02 PM, Fabio Estevam wrote:
>> From: Fabio Estevam <fabio.estevam at nxp.com>
>>
>> devm_ioremap_resource() already checks if the resource is NULL, so
>> remove the unnecessary platform_get_resource() error check.
>>
>> Cc: Philippe Cornu <philippe.cornu at st.com>
>> Signed-off-by: Fabio Estevam <fabio.estevam at nxp.com>
>> ---
>>   drivers/gpu/drm/stm/dw_mipi_dsi-stm.c | 5 -----
>>   1 file changed, 5 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c b/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
>> index 82dcb20..fd02506 100644
>> --- a/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
>> +++ b/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
>> @@ -290,11 +290,6 @@ static int dw_mipi_dsi_stm_probe(struct platform_device *pdev)
>>               return -ENOMEM;
>>
>>       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> -     if (!res) {
>> -             DRM_ERROR("Unable to get resource\n");
>> -             return -ENODEV;
>> -     }
>> -
>
> Many thanks for this cleanup.
>
> Acked-by: Philippe Cornu <philippe.cornu at st.com>

Applied on drm-misc-next,

Thanks,
Benjamin

>
> Philippe :-)
>
>>       dsi->base = devm_ioremap_resource(dev, res);
>>       if (IS_ERR(dsi->base)) {
>>               DRM_ERROR("Unable to get dsi registers\n");
>>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel


More information about the dri-devel mailing list