From: Markus Elfring <Markus.Elfring@web.de>
To: "Michel Dänzer" <michel.daenzer@mailbox.org>,
dri-devel@lists.freedesktop.org, kernel-janitors@vger.kernel.org,
"Daniel Vetter" <daniel@ffwll.ch>,
"David Airlie" <airlied@gmail.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>
Cc: LKML <linux-kernel@vger.kernel.org>,
cocci@inria.fr, Simon Ser <contact@emersion.fr>
Subject: Re: [cocci] [1/3] drm: property: One function call less in drm_property_create() after error detection
Date: Thu, 4 Jan 2024 13:21:46 +0100 [thread overview]
Message-ID: <1ab4ea7c-731a-4b8d-8f6f-c9bf5f0f02e4@web.de> (raw)
In-Reply-To: <ff58a489-105c-4fdc-9af5-59efb9d05ec0@mailbox.org>
> 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@Sonne:…/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
next prev parent reply other threads:[~2024-01-04 12:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-26 9:36 [cocci] [PATCH 0/3] drm: property: Adjustments for three function implementations Markus Elfring
2023-12-26 9:38 ` [cocci] [PATCH 1/3] drm: property: One function call less in drm_property_create() after error detection Markus Elfring
[not found] ` <37647c33-7f9d-4763-8bf4-cfc5c9a811de@mailbox.org>
2024-01-03 16:24 ` Markus Elfring
[not found] ` <dd300771-851f-4cfb-b9a2-d87d2b4399aa@mailbox.org>
2024-01-03 18:08 ` [cocci] [1/3] " Markus Elfring
[not found] ` <ff58a489-105c-4fdc-9af5-59efb9d05ec0@mailbox.org>
2024-01-04 12:21 ` Markus Elfring [this message]
2023-12-26 9:40 ` [cocci] [PATCH 2/3] drm: property: Delete an unnecessary initialisation in drm_property_create() Markus Elfring
2023-12-26 9:42 ` [cocci] [PATCH 3/3] drm: property: Improve four size determinations Markus Elfring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1ab4ea7c-731a-4b8d-8f6f-c9bf5f0f02e4@web.de \
--to=markus.elfring@web.de \
--cc=airlied@gmail.com \
--cc=cocci@inria.fr \
--cc=contact@emersion.fr \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=michel.daenzer@mailbox.org \
--cc=mripard@kernel.org \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).