Commit 65919e6b authored by Philipp Zabel's avatar Philipp Zabel Committed by Mauro Carvalho Chehab

[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: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: default avatarKamil Debski <k.debski@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent ae5abd25
...@@ -3903,7 +3903,7 @@ static int coda_runtime_resume(struct device *dev) ...@@ -3903,7 +3903,7 @@ static int coda_runtime_resume(struct device *dev)
struct coda_dev *cdev = dev_get_drvdata(dev); struct coda_dev *cdev = dev_get_drvdata(dev);
int ret = 0; int ret = 0;
if (dev->pm_domain) { if (dev->pm_domain && cdev->codebuf.vaddr) {
ret = coda_hw_init(cdev); ret = coda_hw_init(cdev);
if (ret) if (ret)
v4l2_err(&cdev->v4l2_dev, "HW initialization failed\n"); v4l2_err(&cdev->v4l2_dev, "HW initialization failed\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment