[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1ab4ea7c-731a-4b8d-8f6f-c9bf5f0f02e4@web.de>
Date: Thu, 4 Jan 2024 13:21:46 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: Michel Dänzer <michel.daenzer@...lbox.org>,
dri-devel@...ts.freedesktop.org, kernel-janitors@...r.kernel.org,
Daniel Vetter <daniel@...ll.ch>, David Airlie <airlied@...il.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>
Cc: LKML <linux-kernel@...r.kernel.org>, cocci@...ia.fr,
Simon Ser <contact@...rsion.fr>
Subject: Re: [1/3] drm: property: One function call less in
drm_property_create() after error detection
> The commit log says:
>
> This issue was detected by using the Coccinelle software.
>
> Either that's inaccurate then,
No.
> or you should be able to provide the corresponding output from Coccinelle.
Do you find data (like the following) more helpful for the adjustment
of affected implementation details?
Markus_Elfring@...ne:…/Projekte/Linux/next-analyses> LANG=C git status && spatch …/Projekte/Coccinelle/janitor/show_jumps_to_kfree_with_null_pointer.cocci drivers/gpu/drm/drm_property.c
HEAD detached at next-20240104
…
@@ -114,9 +114,6 @@ struct drm_property *drm_property_create
property->dev = dev;
if (num_values) {
- property->values = kcalloc(num_values, sizeof(uint64_t),
- GFP_KERNEL);
- if (!property->values)
goto fail;
}
@@ -133,8 +130,6 @@ struct drm_property *drm_property_create
list_add_tail(&property->head, &dev->mode_config.property_list);
return property;
-fail:
- kfree(property->values);
kfree(property);
return NULL;
}
How do you think about to extend the application of script variants
for the semantic patch language?
Regards,
Markus
Powered by blists - more mailing lists