media: qcom: camss: cleanup media device allocated resource on error path
authorVladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Tue, 13 May 2025 14:23:45 +0000 (17:23 +0300)
committerHans Verkuil <hverkuil@xs4all.nl>
Thu, 3 Jul 2025 09:02:45 +0000 (11:02 +0200)
commit69080ec3d0daba8a894025476c98ab16b5a505a4
treecf1a44a31bbb2722eb267e6a1f4d7c18684beaf6
parent868423c834a29981fe3a77d32caf645c6b91a4c5
media: qcom: camss: cleanup media device allocated resource on error path

A call to media_device_init() requires media_device_cleanup() counterpart
to complete cleanup and release any allocated resources.

This has been done in the driver .remove() right from the beginning, but
error paths on .probe() shall also be fixed.

Fixes: a1d7c116fcf7 ("media: camms: Add core files")
Cc: stable@vger.kernel.org
Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/platform/qcom/camss/camss.c