From 312c74e6d360eaa871b66b417868c63728e5170b Mon Sep 17 00:00:00 2001 From: Sakari Ailus Date: Fri, 19 Dec 2025 00:52:43 +0200 Subject: [PATCH] media: ipu6: Remove redundant driver data checks Both runtime PM resume and suspend callbacks check whether the driver's data is set for the device. This is done in probe(); drop the redundant checks. Signed-off-by: Sakari Ailus Reviewed-by: Bingbu Cao Tested-by: Mehdi Djait # Dell XPS 9315 Reviewed-by: Mehdi Djait Signed-off-by: Hans Verkuil --- drivers/media/pci/intel/ipu6/ipu6-isys.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/media/pci/intel/ipu6/ipu6-isys.c b/drivers/media/pci/intel/ipu6/ipu6-isys.c index 226bfae21c168..ef01dcb635fa8 100644 --- a/drivers/media/pci/intel/ipu6/ipu6-isys.c +++ b/drivers/media/pci/intel/ipu6/ipu6-isys.c @@ -857,9 +857,6 @@ static int isys_runtime_pm_resume(struct device *dev) unsigned long flags; int ret; - if (!isys) - return 0; - ret = ipu6_mmu_hw_init(adev->mmu); if (ret) return ret; @@ -884,13 +881,9 @@ static int isys_runtime_pm_resume(struct device *dev) static int isys_runtime_pm_suspend(struct device *dev) { struct ipu6_bus_device *adev = to_ipu6_bus_device(dev); - struct ipu6_isys *isys; + struct ipu6_isys *isys = dev_get_drvdata(dev); unsigned long flags; - isys = dev_get_drvdata(dev); - if (!isys) - return 0; - spin_lock_irqsave(&isys->power_lock, flags); isys->power = 0; spin_unlock_irqrestore(&isys->power_lock, flags); -- 2.47.3