Fix possible crash without a deactivate callback

We were checking for ->activate existing instead of ->deactivate.
This commit is contained in:
Patrick Marlier 2012-01-18 18:52:02 -05:00 committed by Bastien Nocera
parent c96fa32da4
commit 3d2e545264

View file

@ -370,7 +370,7 @@ static void dev_deactivate(struct fp_img_dev *imgdev)
struct fp_driver *drv = imgdev->dev->drv;
struct fp_img_driver *imgdrv = fpi_driver_to_img_driver(drv);
if (!imgdrv->activate)
if (!imgdrv->deactivate)
return;
return imgdrv->deactivate(imgdev);
}