drm/amdgpu: fix warning in dce_virtual.c
Subsystems (2)
PATCH 1/1 drm/amdgpu: fix warning in dce_virtual.c
copy paste typo when I re-arranged the code.
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/dce_virtual.c +4 -4
@@ -657,18 +657,18 @@ static int dce_virtual_connector_encoder_init(struct amdgpu_device *adev,/* add a new encoder */ encoder =kzalloc (sizeof (struct drm_encoder ),GFP_KERNEL ); -if (!encoder) { -kfree (connector); +if (!encoder)return -ENOMEM ; - } encoder->possible_crtcs =1 << index;drm_encoder_init (adev->ddev, encoder, &dce_virtual_encoder_funcs,DRM_MODE_ENCODER_VIRTUAL ,NULL );drm_encoder_helper_add (encoder, &dce_virtual_encoder_helper_funcs); connector =kzalloc (sizeof (struct drm_connector ),GFP_KERNEL ); -if (!connector) +if (!connector) { +kfree (encoder);return -ENOMEM ; + }/* add a new connector */ drm_connector_init(adev->ddev, connector, &dce_virtual_connector_funcs,
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1476468027-10305-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org
Edward O'Callaghan
Reviewed-byReviewed-by Edward O'Callaghan <[email protected]>
if possible can you squash it into the original bad commit?
Quoted 25 lines · Alex Deucher
copy paste typo when I re-arranged the code.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/gpu/drm/amd/amdgpu/dce_virtual.c +1
-3@@ -657,18 +657,18 @@ static int dce_virtual_connector_encoder_init(struct amdgpu_device *adev,/* add a new encoder */ encoder =kzalloc (sizeof (struct drm_encoder ),GFP_KERNEL ); -if (!encoder) { -kfree (connector); +if (!encoder)return -ENOMEM ; - } encoder->possible_crtcs =1 << index;drm_encoder_init (adev->ddev, encoder, &dce_virtual_encoder_funcs,DRM_MODE_ENCODER_VIRTUAL ,NULL );drm_encoder_helper_add (encoder, &dce_virtual_encoder_helper_funcs);
drivers/gpu/drm/amd/amdgpu/dce_virtual.c static int dce_virtual_connector_encoder_init(struct amdgpu_device *adev, · line 674
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/dce_virtual.c +3
-1connector =kzalloc (sizeof (struct drm_connector ),GFP_KERNEL ); -if (!connector) +if (!connector) { +kfree (encoder);return -ENOMEM ; + }/* add a new connector */ drm_connector_init(adev->ddev, connector, &dce_virtual_connector_funcs,
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx