path: root/drivers
diff options
authorPhilipp Zabel <p.zabel@pengutronix.de>2014-07-18 12:22:36 +0200
committerKamil Debski <k.debski@samsung.com>2014-08-05 17:16:38 +0200
commit7660b947424db55d13ce4e4ec65a0bcb524456e6 (patch)
tree7b68542003bec65e62d05b68c90cc5e6a77dada9 /drivers
parent9cf01bfd78a17ca0d7d58e439323ec29881f938c (diff)
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>
Diffstat (limited to 'drivers')
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c
index ec82dec04e31..75bdac0d3b07 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");

Privacy Policy