@@ -1206,16 +1206,16 @@ static ssize_t trigger_hotplug(struct file *f, const char __user *buf,
{
struct amdgpu_dm_connector *aconnector = file_inode(f)->i_private;
struct drm_connector *connector;
- struct dc_link *link = NULL;
+ struct dc_link *link;
struct drm_device *dev;
struct amdgpu_device *adev;
enum dc_connection_type new_connection_type = dc_connection_none;
- char *wr_buf = NULL;
+ char *wr_buf;
uint32_t wr_buf_size = 42;
int max_param_num = 1;
long param[1] = {0};
uint8_t param_nums = 0;
- bool ret = false;
+ bool ret;
if (!aconnector || !aconnector->dc_link)
return -EINVAL;
Date: Tue, 11 Apr 2023 12:34:42 +0200 The variables “link”, “wr_buf” and “ret” will eventually be set to appropriate values a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.40.0