Skip to content
Commit fce6a7bc authored by Colin Ian King's avatar Colin Ian King Committed by Eric Anholt
Browse files

drm/vc4: simplify exit path of a failed allocation of dsi_connector



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: default avatarColin Ian King <colin.king@canonical.com>
Reviewed-by: default avatarEric Anholt <eric@anholt.net>
Reviewed-by: default avatarGustavo Padovan <gustavo.padovan@collabora.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170203195624.7189-1-colin.king@canonical.com
parent 64b0e1d6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment