]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] bdisp: fix debug info memory access
authorFabien Dessenne <fabien.dessenne@st.com>
Mon, 13 Jul 2015 09:54:11 +0000 (06:54 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 17 Jul 2015 12:53:37 +0000 (09:53 -0300)
bdisp_dev->dbg.copy_node shall be a copy of (and not point to)
bdisp_ctx->node, since this resource is freed upon driver release.

Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/sti/bdisp/bdisp-hw.c

index c83f9c2fbe3c776e568d85666ba841d44be66f88..052c932ac94260b3893348c38fc45306a81e2e55 100644 (file)
@@ -768,12 +768,12 @@ static void bdisp_hw_save_request(struct bdisp_ctx *ctx)
                /* Allocate memory if not done yet */
                if (!copy_node[i]) {
                        copy_node[i] = devm_kzalloc(ctx->bdisp_dev->dev,
-                                                   sizeof(*copy_node),
+                                                   sizeof(*copy_node[i]),
                                                    GFP_KERNEL);
                        if (!copy_node[i])
                                return;
                }
-               copy_node[i] = node[i];
+               *copy_node[i] = *node[i];
        }
 }