mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
video: rockchip: mpp: fix access null point in no mmu case
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com> Change-Id: I02445a25b68b2ad8e80b46dc5ffc44ef422ab616
This commit is contained in:
parent
9aa8154c25
commit
b278cacd80
|
|
@ -589,6 +589,9 @@ int mpp_iommu_dev_activate(struct mpp_iommu_info *info, struct mpp_dev *dev)
|
|||
unsigned long flags;
|
||||
int ret = 0;
|
||||
|
||||
if (!info)
|
||||
return 0;
|
||||
|
||||
spin_lock_irqsave(&info->dev_lock, flags);
|
||||
|
||||
if (info->dev_active || !dev) {
|
||||
|
|
@ -614,6 +617,9 @@ int mpp_iommu_dev_deactivate(struct mpp_iommu_info *info, struct mpp_dev *dev)
|
|||
{
|
||||
unsigned long flags;
|
||||
|
||||
if (!info)
|
||||
return 0;
|
||||
|
||||
spin_lock_irqsave(&info->dev_lock, flags);
|
||||
|
||||
if (info->dev_active != dev)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user