Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1576176

Re: [PATCH] drm/vc4: simplify exit path of a failed allocation of dsi_connector

From Eric Anholt <eric@anholt.net>
Newsgroups linux.kernel
Subject Re: [PATCH] drm/vc4: simplify exit path of a failed allocation of dsi_connector
Date 2017-02-08 00:50 +0100
Message-ID <t8nGh-ZA-7@gated-at.bofh.it> (permalink)
References <t6Sbw-6dd-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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!

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] drm/vc4: simplify exit path of a failed allocation of dsi_connector Colin King <colin.king@canonical.com> - 2017-02-03 21:00 +0100
  Re: [PATCH] drm/vc4: simplify exit path of a failed allocation of  dsi_connector Gustavo Padovan <gustavo@padovan.org> - 2017-02-06 12:50 +0100
  Re: [PATCH] drm/vc4: simplify exit path of a failed allocation of dsi_connector Eric Anholt <eric@anholt.net> - 2017-02-08 00:50 +0100

csiph-web