summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/rcar-du
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2020-12-03 17:02:40 +0200
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2021-01-05 07:20:00 +0200
commitd8d164a2b2c71d9fe798fdead06695d1be241c17 (patch)
tree41fd2e1d68077ded38e021606932dbe627bda60b /drivers/gpu/drm/rcar-du
parent594f967b53ffafd50c5f091f434c4a07e2d0f613 (diff)
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: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Diffstat (limited to 'drivers/gpu/drm/rcar-du')
-rw-r--r--drivers/gpu/drm/rcar-du/rcar_du_encoder.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_encoder.c b/drivers/gpu/drm/rcar-du/rcar_du_encoder.c
index 50fc14534fa4..e4bac47caf16 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_encoder.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_encoder.c
@@ -123,11 +123,8 @@ int rcar_du_encoder_init(struct rcar_du_device *rcdu,
}
done:
- if (ret < 0) {
- if (encoder->name)
- encoder->funcs->destroy(encoder);
+ if (ret < 0)
devm_kfree(rcdu->dev, renc);
- }
return ret;
}