Displaying 9 results from an estimated 9 matches for "err_free_cirrus".
2020 Mar 02
2
[PATCH 09/51] drm/cirrus: Use drmm_add_final_kfree
...-
drm_mode_config_cleanup(dev);
- kfree(cirrus);
+ drm_dev_fini(dev);
}
DEFINE_DRM_GEM_FOPS(cirrus_fops);
@@ -575,9 +574,12 @@ static int cirrus_pci_probe(struct pci_dev *pdev,
dev = &cirrus->dev;
ret = drm_dev_init(dev, &cirrus_driver, &pdev->dev);
- if (ret)
- goto err_free_cirrus;
+ if (ret) {
+ kfree(cirrus);
+ goto err_pci_release;
+ }
dev->dev_private = cirrus;
+ drmm_add_final_kfree(dev, cirrus);
ret = -ENOMEM;
cirrus->vram = ioremap(pci_resource_start(pdev, 0),
@@ -618,8 +620,6 @@ static int cirrus_pci_probe(struct pci_dev *pdev,
iounmap(cirrus->vr...
2020 Mar 02
2
[PATCH 09/51] drm/cirrus: Use drmm_add_final_kfree
...-
drm_mode_config_cleanup(dev);
- kfree(cirrus);
+ drm_dev_fini(dev);
}
DEFINE_DRM_GEM_FOPS(cirrus_fops);
@@ -575,9 +574,12 @@ static int cirrus_pci_probe(struct pci_dev *pdev,
dev = &cirrus->dev;
ret = drm_dev_init(dev, &cirrus_driver, &pdev->dev);
- if (ret)
- goto err_free_cirrus;
+ if (ret) {
+ kfree(cirrus);
+ goto err_pci_release;
+ }
dev->dev_private = cirrus;
+ drmm_add_final_kfree(dev, cirrus);
ret = -ENOMEM;
cirrus->vram = ioremap(pci_resource_start(pdev, 0),
@@ -618,8 +620,6 @@ static int cirrus_pci_probe(struct pci_dev *pdev,
iounmap(cirrus->vr...
2020 Feb 19
0
[PATCH 10/52] drm/cirrus: Use drmm_add_final_kfree
...-
drm_mode_config_cleanup(dev);
- kfree(cirrus);
+ drm_dev_fini(dev);
}
DEFINE_DRM_GEM_FOPS(cirrus_fops);
@@ -575,9 +574,12 @@ static int cirrus_pci_probe(struct pci_dev *pdev,
dev = &cirrus->dev;
ret = drm_dev_init(dev, &cirrus_driver, &pdev->dev);
- if (ret)
- goto err_free_cirrus;
+ if (ret) {
+ kfree(cirrus);
+ goto err_pci_release;
+ }
dev->dev_private = cirrus;
+ drmm_add_final_kfree(dev, cirrus);
ret = -ENOMEM;
cirrus->vram = ioremap(pci_resource_start(pdev, 0),
@@ -618,8 +620,6 @@ static int cirrus_pci_probe(struct pci_dev *pdev,
iounmap(cirrus->vr...
2020 Mar 03
0
[PATCH 09/51] drm/cirrus: Use drmm_add_final_kfree
> @@ -575,9 +574,12 @@ static int cirrus_pci_probe(struct pci_dev *pdev,
>
> dev = &cirrus->dev;
> ret = drm_dev_init(dev, &cirrus_driver, &pdev->dev);
> - if (ret)
> - goto err_free_cirrus;
> + if (ret) {
> + kfree(cirrus);
> + goto err_pci_release;
> + }
> dev->dev_private = cirrus;
> + drmm_add_final_kfree(dev, cirrus);
That doesn't look like an error path improvement.
With patch #30 applied it'll looks alot better though.
So maybe squash the patch...
2019 Apr 03
0
[PATCH] drm/cirrus: rewrite and modernize driver.
...r_pci_release;
> + dev->dev_private = cirrus;
> + cirrus->dev = dev;
> +
> + cirrus->vram = ioremap(pci_resource_start(pdev, 0),
> + pci_resource_len(pdev, 0));
> + if (cirrus->vram == NULL)
> + goto err_free_cirrus;
> +
> + cirrus->mmio = ioremap(pci_resource_start(pdev, 1),
> + pci_resource_len(pdev, 1));
> + if (cirrus->mmio == NULL)
> + goto err_unmap_vram;
> +
> + cirrus_mode_config_init(cirrus);
> +
> + re...
2019 Apr 03
5
[PATCH] drm/cirrus: rewrite and modernize driver.
...= -ENOMEM;
+ cirrus = kzalloc(sizeof(*cirrus), GFP_KERNEL);
+ if (cirrus == NULL)
+ goto err_pci_release;
+ dev->dev_private = cirrus;
+ cirrus->dev = dev;
+
+ cirrus->vram = ioremap(pci_resource_start(pdev, 0),
+ pci_resource_len(pdev, 0));
+ if (cirrus->vram == NULL)
+ goto err_free_cirrus;
+
+ cirrus->mmio = ioremap(pci_resource_start(pdev, 1),
+ pci_resource_len(pdev, 1));
+ if (cirrus->mmio == NULL)
+ goto err_unmap_vram;
+
+ cirrus_mode_config_init(cirrus);
+
+ ret = cirrus_conn_init(cirrus);
+ if (ret < 0)
+ goto err_cleanup;
+
+ ret = cirrus_pipe_init(cirrus...
2019 Apr 03
5
[PATCH] drm/cirrus: rewrite and modernize driver.
...= -ENOMEM;
+ cirrus = kzalloc(sizeof(*cirrus), GFP_KERNEL);
+ if (cirrus == NULL)
+ goto err_pci_release;
+ dev->dev_private = cirrus;
+ cirrus->dev = dev;
+
+ cirrus->vram = ioremap(pci_resource_start(pdev, 0),
+ pci_resource_len(pdev, 0));
+ if (cirrus->vram == NULL)
+ goto err_free_cirrus;
+
+ cirrus->mmio = ioremap(pci_resource_start(pdev, 1),
+ pci_resource_len(pdev, 1));
+ if (cirrus->mmio == NULL)
+ goto err_unmap_vram;
+
+ cirrus_mode_config_init(cirrus);
+
+ ret = cirrus_conn_init(cirrus);
+ if (ret < 0)
+ goto err_cleanup;
+
+ ret = cirrus_pipe_init(cirrus...
2019 Apr 05
1
[PATCH v3 5/5] drm/cirrus: rewrite and modernize driver.
...= pci_request_regions(pdev, DRIVER_NAME);
+ if (ret)
+ return ret;
+
+ ret = -ENOMEM;
+ cirrus = kzalloc(sizeof(*cirrus), GFP_KERNEL);
+ if (cirrus == NULL)
+ goto err_pci_release;
+
+ dev = &cirrus->dev;
+ ret = drm_dev_init(dev, &cirrus_driver, &pdev->dev);
+ if (ret)
+ goto err_free_cirrus;
+ dev->dev_private = cirrus;
+
+ ret = -ENOMEM;
+ cirrus->vram = ioremap(pci_resource_start(pdev, 0),
+ pci_resource_len(pdev, 0));
+ if (cirrus->vram == NULL)
+ goto err_dev_put;
+
+ cirrus->mmio = ioremap(pci_resource_start(pdev, 1),
+ pci_resource_len(pdev, 1));
+...
2019 Apr 04
1
[PATCH v2 6/6] drm/cirrus: rewrite and modernize driver.
...= pci_request_regions(pdev, DRIVER_NAME);
+ if (ret)
+ return ret;
+
+ ret = -ENOMEM;
+ cirrus = kzalloc(sizeof(*cirrus), GFP_KERNEL);
+ if (cirrus == NULL)
+ goto err_pci_release;
+
+ dev = &cirrus->dev;
+ ret = drm_dev_init(dev, &cirrus_driver, &pdev->dev);
+ if (ret)
+ goto err_free_cirrus;
+ dev->dev_private = cirrus;
+
+ ret = -ENOMEM;
+ cirrus->vram = ioremap(pci_resource_start(pdev, 0),
+ pci_resource_len(pdev, 0));
+ if (cirrus->vram == NULL)
+ goto err_dev_put;
+
+ cirrus->mmio = ioremap(pci_resource_start(pdev, 1),
+ pci_resource_len(pdev, 1));
+...