[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87poit4l9h.fsf@eliezer.anholt.net>
Date: Tue, 07 Feb 2017 15:46:34 -0800
From: Eric Anholt <eric@...olt.net>
To: Colin King <colin.king@...onical.com>,
David Airlie <airlied@...ux.ie>,
dri-devel@...ts.freedesktop.org
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/vc4: simplify exit path of a failed allocation of dsi_connector
Colin King <colin.king@...onical.com> writes:
> From: Colin Ian King <colin.king@...onical.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@...onical.com>
Reviewed and pushed to drm-misc-next. Thanks!
Download attachment "signature.asc" of type "application/pgp-signature" (833 bytes)
Powered by blists - more mailing lists