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>
This commit is contained in:
Родитель
594f967b53
Коммит
d8d164a2b2
|
@ -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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче