On 18/04/2021 02:05, Laurent Pinchart wrote:
Hi Tomi,
Thank you for the patch.
On Mon, Apr 12, 2021 at 02:34:31PM +0300, Tomi Valkeinen wrote:
cal_camerarx_create() doesn't handle error returned from
cal_camerarx_sd_init_cfg()
This looks good.
and it always runs all the cleanup/free
functions in the error code path. The latter doesn't cause any issues at
the moment as media_entity_cleanup() is an empty function.
But this was by design. Do you think we could keep
media_entity_cleanup() idempotent ? That would simplify error paths (as
shown here).
It isn't documented. I can change the doc for media_entity_cleanup to
state it can be called multiple times, if that was the intention, and
simplify the error handling here.
Tomi