* [PATCH] drm/msm: Fix an error handling path 'msm_drm_init()'
@ 2020-03-15 19:42 ` Christophe JAILLET
0 siblings, 0 replies; 6+ messages in thread
From: Christophe JAILLET @ 2020-03-15 19:42 UTC (permalink / raw)
To: robdclark, sean, airlied, daniel, dianders
Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel,
kernel-janitors, Christophe JAILLET
If this memory allocation fails, we have to go through the error handling
path to perform some clean-up, as already done in other other paths of
this function.
Fixes: db735fc4036b ("drm/msm: Set dma maximum segment size for mdss")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/gpu/drm/msm/msm_drv.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index 2a82c23a6e4d..29295dee2a2e 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -444,8 +444,10 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv)
if (!dev->dma_parms) {
dev->dma_parms = devm_kzalloc(dev, sizeof(*dev->dma_parms),
GFP_KERNEL);
- if (!dev->dma_parms)
- return -ENOMEM;
+ if (!dev->dma_parms) {
+ ret = -ENOMEM;
+ goto err_msm_uninit;
+ }
}
dma_set_max_seg_size(dev, DMA_BIT_MASK(32));
--
2.20.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] drm/msm: Fix an error handling path 'msm_drm_init()'
@ 2020-03-15 19:42 ` Christophe JAILLET
0 siblings, 0 replies; 6+ messages in thread
From: Christophe JAILLET @ 2020-03-15 19:42 UTC (permalink / raw)
To: robdclark, sean, airlied, daniel, dianders
Cc: linux-arm-msm, kernel-janitors, linux-kernel, dri-devel,
Christophe JAILLET, freedreno
If this memory allocation fails, we have to go through the error handling
path to perform some clean-up, as already done in other other paths of
this function.
Fixes: db735fc4036b ("drm/msm: Set dma maximum segment size for mdss")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/gpu/drm/msm/msm_drv.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index 2a82c23a6e4d..29295dee2a2e 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -444,8 +444,10 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv)
if (!dev->dma_parms) {
dev->dma_parms = devm_kzalloc(dev, sizeof(*dev->dma_parms),
GFP_KERNEL);
- if (!dev->dma_parms)
- return -ENOMEM;
+ if (!dev->dma_parms) {
+ ret = -ENOMEM;
+ goto err_msm_uninit;
+ }
}
dma_set_max_seg_size(dev, DMA_BIT_MASK(32));
--
2.20.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] drm/msm: Fix an error handling path 'msm_drm_init()'
@ 2020-03-15 19:42 ` Christophe JAILLET
0 siblings, 0 replies; 6+ messages in thread
From: Christophe JAILLET @ 2020-03-15 19:42 UTC (permalink / raw)
To: robdclark, sean, airlied, daniel, dianders
Cc: linux-arm-msm, kernel-janitors, linux-kernel, dri-devel,
Christophe JAILLET, freedreno
If this memory allocation fails, we have to go through the error handling
path to perform some clean-up, as already done in other other paths of
this function.
Fixes: db735fc4036b ("drm/msm: Set dma maximum segment size for mdss")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/gpu/drm/msm/msm_drv.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index 2a82c23a6e4d..29295dee2a2e 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -444,8 +444,10 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv)
if (!dev->dma_parms) {
dev->dma_parms = devm_kzalloc(dev, sizeof(*dev->dma_parms),
GFP_KERNEL);
- if (!dev->dma_parms)
- return -ENOMEM;
+ if (!dev->dma_parms) {
+ ret = -ENOMEM;
+ goto err_msm_uninit;
+ }
}
dma_set_max_seg_size(dev, DMA_BIT_MASK(32));
--
2.20.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/msm: Fix an error handling path 'msm_drm_init()'
2020-03-15 19:42 ` Christophe JAILLET
(?)
@ 2020-03-17 17:26 ` Doug Anderson
-1 siblings, 0 replies; 6+ messages in thread
From: Doug Anderson @ 2020-03-17 17:26 UTC (permalink / raw)
To: Christophe JAILLET
Cc: Rob Clark, Sean Paul, David Airlie, Daniel Vetter, linux-arm-msm,
dri-devel, freedreno, LKML, kernel-janitors
Hi,
On Sun, Mar 15, 2020 at 12:42 PM Christophe JAILLET
<christophe.jaillet@wanadoo.fr> wrote:
>
> If this memory allocation fails, we have to go through the error handling
> path to perform some clean-up, as already done in other other paths of
> this function.
>
> Fixes: db735fc4036b ("drm/msm: Set dma maximum segment size for mdss")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> drivers/gpu/drm/msm/msm_drv.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
This has already been posted as:
https://lore.kernel.org/r/20200309101410.GA18031@duo.ucw.cz
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/msm: Fix an error handling path 'msm_drm_init()'
@ 2020-03-17 17:26 ` Doug Anderson
0 siblings, 0 replies; 6+ messages in thread
From: Doug Anderson @ 2020-03-17 17:26 UTC (permalink / raw)
To: Christophe JAILLET
Cc: freedreno, David Airlie, linux-arm-msm, kernel-janitors, LKML,
dri-devel, Sean Paul
Hi,
On Sun, Mar 15, 2020 at 12:42 PM Christophe JAILLET
<christophe.jaillet@wanadoo.fr> wrote:
>
> If this memory allocation fails, we have to go through the error handling
> path to perform some clean-up, as already done in other other paths of
> this function.
>
> Fixes: db735fc4036b ("drm/msm: Set dma maximum segment size for mdss")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> drivers/gpu/drm/msm/msm_drv.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
This has already been posted as:
https://lore.kernel.org/r/20200309101410.GA18031@duo.ucw.cz
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/msm: Fix an error handling path 'msm_drm_init()'
@ 2020-03-17 17:26 ` Doug Anderson
0 siblings, 0 replies; 6+ messages in thread
From: Doug Anderson @ 2020-03-17 17:26 UTC (permalink / raw)
To: Christophe JAILLET
Cc: freedreno, David Airlie, linux-arm-msm, kernel-janitors, LKML,
dri-devel, Sean Paul
Hi,
On Sun, Mar 15, 2020 at 12:42 PM Christophe JAILLET
<christophe.jaillet@wanadoo.fr> wrote:
>
> If this memory allocation fails, we have to go through the error handling
> path to perform some clean-up, as already done in other other paths of
> this function.
>
> Fixes: db735fc4036b ("drm/msm: Set dma maximum segment size for mdss")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> drivers/gpu/drm/msm/msm_drv.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
This has already been posted as:
https://lore.kernel.org/r/20200309101410.GA18031@duo.ucw.cz
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-03-17 17:27 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-15 19:42 [PATCH] drm/msm: Fix an error handling path 'msm_drm_init()' Christophe JAILLET
2020-03-15 19:42 ` Christophe JAILLET
2020-03-15 19:42 ` Christophe JAILLET
2020-03-17 17:26 ` Doug Anderson
2020-03-17 17:26 ` Doug Anderson
2020-03-17 17:26 ` Doug Anderson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.