ctx->gsc_clk = clk_get(dev, "gscl");
if (IS_ERR(ctx->gsc_clk)) {
dev_err(dev, "failed to get gsc clock.\n");
- ret = PTR_ERR(ctx->gsc_clk);
- goto err_ctx;
+ return PTR_ERR(ctx->gsc_clk);
}
/* resource memory */
if (!res) {
dev_err(dev, "failed to request irq resource.\n");
ret = -ENOENT;
- goto err_get_regs;
+ goto err_clk;
}
ctx->irq = res->start;
IRQF_ONESHOT, "drm_gsc", ctx);
if (ret < 0) {
dev_err(dev, "failed to request irq.\n");
- goto err_get_regs;
+ goto err_clk;
}
/* context initailization */
pm_runtime_disable(dev);
err_get_irq:
free_irq(ctx->irq, ctx);
-err_get_regs:
- devm_iounmap(dev, ctx->regs);
err_clk:
clk_put(ctx->gsc_clk);
-err_ctx:
- devm_kfree(dev, ctx);
return ret;
}
pm_runtime_disable(dev);
free_irq(ctx->irq, ctx);
- devm_iounmap(dev, ctx->regs);
-
clk_put(ctx->gsc_clk);
- devm_kfree(dev, ctx);
-
return 0;
}