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

Message ID 7c6a919c-3757-42af-aee4-3d48721d1959@web.de
State New
Headers
Series [1/3] drm: property: One function call less in drm_property_create() after error detection |

Commit Message

Markus Elfring Dec. 26, 2023, 9:40 a.m. UTC
  From: Markus Elfring <elfring@users.sourceforge.net>
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@users.sourceforge.net>
---
 drivers/gpu/drm/drm_property.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.43.0
  

Patch

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)))