lkml.org 
[lkml]   [2017]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] drm/vc4: simplify exit path of a failed allocation of dsi_connector
Date
Colin King <colin.king@canonical.com> writes:

> From: Colin Ian King <colin.king@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@canonical.com>

Reviewed and pushed to drm-misc-next. Thanks!
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2017-02-08 00:48    [W:0.068 / U:1.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site