mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09: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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user