@@ -306,12 +306,16 @@ static int psb_driver_load(struct drm_device *dev, unsigned long flags)
goto out_err;
dev_priv->mmu = psb_mmu_driver_init(dev, 1, 0, 0);
- if (!dev_priv->mmu)
+ if (!dev_priv->mmu) {
+ ret = -ENOMEM;
goto out_err;
+ }
dev_priv->pf_pd = psb_mmu_alloc_pd(dev_priv->mmu, 1, 0);
- if (!dev_priv->pf_pd)
+ if (!dev_priv->pf_pd) {
+ ret = -ENOMEM;
goto out_err;
+ }
ret = psb_do_init(dev);
if (ret)
@@ -678,6 +678,7 @@ static int omap_dmm_probe(struct platform_device *dev)
&omap_dmm->refill_pa, GFP_KERNEL);
if (!omap_dmm->refill_va) {
dev_err(&dev->dev, "could not allocate refill memory\n");
+ ret = -ENOMEM;
goto fail;
}