Re: [PATCH 1/1] drm/sun4i: hdmi: Check for null pointer before cleanup

From: Uwe Kleine-König
Date: Tue Dec 17 2019 - 02:26:42 EST


On Mon, Dec 16, 2019 at 04:43:48PM +0200, Stefan Mavrodiev wrote:
> It's possible hdmi->connector and hdmi->encoder divices to be NULL.

The wording is broken and s/divices/devices/. I'd write:

It's possible that the parent devices of the connector and/or
encoder are NULL. This makes drm_connector_cleanup and
drm_encoder_cleanup respectively trigger a NULL pointer
exeception:

<...log here...>

This is reproducible by

<...receipt here...>

So add a check for NULL before calling these functions.

Of course this doesn't address the reservations by Maxime.

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |