media: ti: cal: Fix cal_camerarx_create() error handling
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Mon, 19 Jun 2023 11:40:05 +0000 (14:40 +0300)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Tue, 25 Jul 2023 07:24:30 +0000 (09:24 +0200)
commit2633288acc8c2cec4e5d6b95f843c2c409a75746
tree24acdc459f79a07d3f69c63ac0fcfea5e78a5c07
parent662cf98d170d5e9645490b524dc0a0667ead2bf4
media: ti: cal: Fix cal_camerarx_create() error handling

We don't do a proper job at freeing resources in cal_camerarx_create's
error paths.

Fix these, and also switch the phy allcation from kzalloc to
devm_kzalloc to simplify the code further.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/platform/ti/cal/cal-camerarx.c