[PATCH 2/3] drm: property: Delete an unnecessary initialisation in drm_property_create()

From: Markus Elfring
Date: Tue Dec 26 2023 - 04:41:13 EST


From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 26 Dec 2023 08:46:12 +0100

The variable “property” will eventually be set to an appropriate pointer
a bit later. Thus omit the explicit initialisation at the beginning.

Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
---
drivers/gpu/drm/drm_property.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_property.c b/drivers/gpu/drm/drm_property.c
index 3440f4560e6e..ea365f00e890 100644
--- a/drivers/gpu/drm/drm_property.c
+++ b/drivers/gpu/drm/drm_property.c
@@ -98,7 +98,7 @@ struct drm_property *drm_property_create(struct drm_device *dev,
u32 flags, const char *name,
int num_values)
{
- struct drm_property *property = NULL;
+ struct drm_property *property;
int ret;

if (WARN_ON(!drm_property_flags_valid(flags)))
--
2.43.0