Commit d8d164a2 authored by Laurent Pinchart's avatar Laurent Pinchart

drm: rcar-du: Drop unneeded encoder cleanup in error path

The encoder->name field can never be non-null in the error path, as that
can only be possible after a successful call to
drm_simple_encoder_init(). Drop the cleanup.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: default avatarJacopo Mondi <jacopo+renesas@jmondi.org>
Reviewed-by: default avatarKieran Bingham <kieran.bingham+renesas@ideasonboard.com>
parent 594f967b
...@@ -123,11 +123,8 @@ int rcar_du_encoder_init(struct rcar_du_device *rcdu, ...@@ -123,11 +123,8 @@ int rcar_du_encoder_init(struct rcar_du_device *rcdu,
} }
done: done:
if (ret < 0) { if (ret < 0)
if (encoder->name)
encoder->funcs->destroy(encoder);
devm_kfree(rcdu->dev, renc); devm_kfree(rcdu->dev, renc);
}
return ret; return ret;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment