lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACvgo50Z18JtkD=F9PtxfQjjJBP9JhCOSUKkHYcLYO+NFnqU-Q@mail.gmail.com>
Date:   Fri, 8 Sep 2017 14:45:40 +0100
From:   Emil Velikov <emil.l.velikov@...il.com>
To:     Colin King <colin.king@...onical.com>
Cc:     Eric Anholt <eric@...olt.net>, David Airlie <airlied@...ux.ie>,
        ML dri-devel <dri-devel@...ts.freedesktop.org>,
        kernel-janitors@...r.kernel.org,
        "Linux-Kernel@...r. Kernel. Org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/vc4: clean up error handling on devm_kzalloc failure

Hi Colin,

On 8 September 2017 at 14:17, Colin King <colin.king@...onical.com> wrote:
> From: Colin Ian King <colin.king@...onical.com>
>
> The current error handling on devm_kzalloc failures performs a non-null
> check on connector. Thss check is redundant because connector is null
> at that failure point.  With this check removed, we may as well make
> the failure path into a trivial -ENOMEM return to clean up the error
> handling.
>
> Detected by CoverityScan CID#1339527 ("Logically dead code")
>
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
>  drivers/gpu/drm/vc4/vc4_hdmi.c | 13 ++-----------
>  1 file changed, 2 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
> index 937da8dd65b8..a8808c1a1e03 100644
> --- a/drivers/gpu/drm/vc4/vc4_hdmi.c
> +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
> @@ -311,14 +311,11 @@ static struct drm_connector *vc4_hdmi_connector_init(struct drm_device *dev,
>  {
>         struct drm_connector *connector = NULL;
I think you can drop the initializer now.

-Emil

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ