[PATCH] drm/vc4: simplify exit path of a failed allocation of dsi_connector
Eric Anholt
eric at anholt.net
Tue Feb 7 23:46:34 UTC 2017
Colin King <colin.king at canonical.com> writes:
> From: Colin Ian King <colin.king at canonical.com>
>
> If dsi_connector fails to allocate, the exit path via label 'fail'
> checks if connector is null, which it always is, so the cleanup
> that destroys connector is never going to be called. Hence the
> failure path can be more optimally performed by removing this
> and just returning ERR_PTR(-ENOMEM). This also removes the need
> to initialize connector to NULL, and we can also remove ret too.
>
> Detected by CoverityScan, CID#1399504 ("Logicall Dead Code")
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
Reviewed and pushed to drm-misc-next. Thanks!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20170207/5c419e7e/attachment.sig>
More information about the dri-devel
mailing list