diff options
| author | Stefan Wahren <[email protected]> | 2024-04-20 09:12:40 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2024-05-04 16:41:36 +0000 |
| commit | 62cbabc6fd228e62daff6ec108fae35632e2b692 (patch) | |
| tree | 47d98d660d2f524d983839c5815b979b5c7095cb | |
| parent | Staging: rtl8192e: Rename variable DssCCk (diff) | |
| download | kernel-62cbabc6fd228e62daff6ec108fae35632e2b692.tar.gz kernel-62cbabc6fd228e62daff6ec108fae35632e2b692.zip | |
staging: vc04_services: vchiq_arm: Fix NULL ptr dereferences
The commit 8c9753f63905 ("staging: vc04_services: vchiq_arm: Drop
g_cache_line_size") introduced NULL pointer dereferences by
using the wrong device.
Fixes: 8c9753f63905 ("staging: vc04_services: vchiq_arm: Drop g_cache_line_size")
Signed-off-by: Stefan Wahren <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Reviewed-by: Umang Jain <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
| -rw-r--r-- | drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index 502ddc0f6e46..c06232fcb0fb 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -257,7 +257,7 @@ create_pagelist(struct vchiq_instance *instance, char *buf, char __user *ubuf, if (count >= INT_MAX - PAGE_SIZE) return NULL; - drv_mgmt = dev_get_drvdata(instance->state->dev->parent); + drv_mgmt = dev_get_drvdata(instance->state->dev); if (buf) offset = (uintptr_t)buf & (PAGE_SIZE - 1); @@ -436,7 +436,7 @@ free_pagelist(struct vchiq_instance *instance, struct vchiq_pagelist_info *pagel dev_dbg(instance->state->dev, "arm: %pK, %d\n", pagelistinfo->pagelist, actual); - drv_mgmt = dev_get_drvdata(instance->state->dev->parent); + drv_mgmt = dev_get_drvdata(instance->state->dev); /* * NOTE: dma_unmap_sg must be called before the |
