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
6 The error path during probe frees the private memory block, and
7 then promptly dereferences it to log an error message.
9 Use the base device instead of the pointer to it in the private
12 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
14 drivers/char/broadcom/rpivid-mem.c | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
17 --- a/drivers/char/broadcom/rpivid-mem.c
18 +++ b/drivers/char/broadcom/rpivid-mem.c
19 @@ -229,7 +229,7 @@ failed_alloc_chrdev:
23 - dev_err(priv->dev, "could not load rpivid_mem");
24 + dev_err(&pdev->dev, "could not load rpivid_mem");