OSDN Git Service

media: pxa_camera: Fix probe error handling
authorSakari Ailus <sakari.ailus@linux.intel.com>
Fri, 28 Apr 2023 11:14:46 +0000 (13:14 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Thu, 10 Aug 2023 05:58:31 +0000 (07:58 +0200)
commit6e1e132e0038a2a4bce11ff1ad0db3b4564042c9
tree3e9ff54eeb760cdc83e467564bb9f130fe9cc8c4
parent1e3454582e11e0108ad0743529461181f8476741
media: pxa_camera: Fix probe error handling

Fix and simplify error handling in pxa_camera probe, by moving devm_*()
functions early in the probe function and then tearing down what was set
up on error patch.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Tested-by: Philipp Zabel <p.zabel@pengutronix.de> # imx6qp
Tested-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> # rcar + adv746x
Tested-by: Aishwarya Kothari <aishwarya.kothari@toradex.com> # Apalis i.MX6Q with TC358743
Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> # Renesas RZ/G2L SMARC
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/intel/pxa_camera.c