Skip to content

Commit

Permalink
media: dw9807-vcm: Fix probe error handling
Browse files Browse the repository at this point in the history
[ Upstream commit 9e5b5081fa117ae34eca94b63b1cb6d43dc28f10 ]

v4l2_async_unregister_subdev() may not be called without
v4l2_async_register_subdev() being called first. Fix this.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Sakari Ailus authored and miraclestars committed Aug 12, 2020
1 parent 5530f23 commit 2ad0036
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/media/i2c/dw9807-vcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ static int dw9807_probe(struct i2c_client *client)
return 0;

err_cleanup:
dw9807_subdev_cleanup(dw9807_dev);
v4l2_ctrl_handler_free(&dw9807_dev->ctrls_vcm);
media_entity_cleanup(&dw9807_dev->sd.entity);

return rval;
}
Expand Down

0 comments on commit 2ad0036

Please sign in to comment.