The power management hooks were never unregistered, which caused a crash when unloading the module. Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx> --- drivers/media/platform/via-camera.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/platform/via-camera.c b/drivers/media/platform/via-camera.c index 24d5759501a5..f9016c2ee70d 100644 --- a/drivers/media/platform/via-camera.c +++ b/drivers/media/platform/via-camera.c @@ -1464,6 +1464,9 @@ static int viacam_remove(struct platform_device *pdev) video_unregister_device(&cam->vdev); v4l2_device_unregister(&cam->v4l2_dev); +#ifdef CONFIG_PM + viafb_pm_unregister(&viacam_pm_hooks); +#endif free_irq(viadev->pdev->irq, cam); via_sensor_power_release(cam); v4l2_ctrl_handler_free(&cam->ctrl_handler); -- 2.20.1