bcm27xx-gpu-fw: update to latest version
[openwrt/openwrt.git] / target / linux / bcm27xx / patches-5.4 / 950-0391-driver-char-rpivid-Fix-access-to-freed-memory.patch
1 From be492eed9f4724798a7b85cf8779772dc901f986 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Tue, 21 Jan 2020 16:44:14 +0000
4 Subject: [PATCH] driver: char: rpivid: Fix access to freed memory
5
6 The error path during probe frees the private memory block, and
7 then promptly dereferences it to log an error message.
8
9 Use the base device instead of the pointer to it in the private
10 structure.
11
12 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
13 ---
14 drivers/char/broadcom/rpivid-mem.c | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17 --- a/drivers/char/broadcom/rpivid-mem.c
18 +++ b/drivers/char/broadcom/rpivid-mem.c
19 @@ -229,7 +229,7 @@ failed_alloc_chrdev:
20 failed_get_resource:
21 kfree(priv);
22 failed_inst_alloc:
23 - dev_err(priv->dev, "could not load rpivid_mem");
24 + dev_err(&pdev->dev, "could not load rpivid_mem");
25 return err;
26 }
27