Reviewed-by: Edward O'Callaghan <funfunc...@folklore1984.net>

if possible can you squash it into the original bad commit?

On 10/15/2016 05:00 AM, Alex Deucher wrote:
> copy paste typo when I re-arranged the code.
> 
> Signed-off-by: Alex Deucher <alexander.deuc...@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c 
> b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
> index 2eefa5d..48973b7 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
> @@ -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,
> 

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to