summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2014-07-18 07:22:36 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-08-21 15:25:18 -0500
commit65919e6baa4e6e193dd7e4aa4cfd94b9d69e367e (patch)
treed3e32f372b10575fb401d9bdc42184f39dde3385
parentae5abd2561b40a1f046088cd30b900ccde63fbc5 (diff)
downloadop-kernel-dev-65919e6baa4e6e193dd7e4aa4cfd94b9d69e367e.zip
op-kernel-dev-65919e6baa4e6e193dd7e4aa4cfd94b9d69e367e.tar.gz
[media] coda: initialize hardware on pm runtime resume only if firmware available
If no firmware was found and the coda module is unloaded, coda_runtime_resume will be called without an allocated code buffer. Do not call coda_hw_init in this case. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r--drivers/media/platform/coda.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c
index ec82dec..75bdac0 100644
--- a/drivers/media/platform/coda.c
+++ b/drivers/media/platform/coda.c
@@ -3903,7 +3903,7 @@ static int coda_runtime_resume(struct device *dev)
struct coda_dev *cdev = dev_get_drvdata(dev);
int ret = 0;
- if (dev->pm_domain) {
+ if (dev->pm_domain && cdev->codebuf.vaddr) {
ret = coda_hw_init(cdev);
if (ret)
v4l2_err(&cdev->v4l2_dev, "HW initialization failed\n");
OpenPOWER on IntegriCloud