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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Colin,

2017-02-03 Colin King <colin.king@xxxxxxxxxxxxx>:

> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
> 
> 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@xxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/vc4/vc4_dsi.c | 16 ++++------------
>  1 file changed, 4 insertions(+), 12 deletions(-)

Reviewed-by: Gustavo Padovan <gustavo.padovan@xxxxxxxxxxxxx>

Gustavo

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux