aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorAaron Lu <aaron.lu@intel.com>2013-01-28 00:08:02 -0500
committerJeff Garzik <jgarzik@redhat.com>2013-02-20 17:14:03 -0500
commit53637e0760d56274177be7e6d630490bc49766c1 (patch)
tree1460da4181c17e2498aef9da44d6f3289ecfcddc /drivers/ata
parent84a9a8cd9d0aa93c17e5815ab8a9cc4c0a765c63 (diff)
[libata] fix smatch warning for zpodd_wake_dev
Fix a smatch warning caused by an useless pointer check. The context parameter (aka. ata_dev) will never be NULL until we remove the acpi notification handler, so it is pointless to check it for NULL. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/libata-zpodd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/ata/libata-zpodd.c b/drivers/ata/libata-zpodd.c
index a7df60383532..90b159b740b3 100644
--- a/drivers/ata/libata-zpodd.c
+++ b/drivers/ata/libata-zpodd.c
@@ -246,8 +246,7 @@ static void zpodd_wake_dev(acpi_handle handle, u32 event, void *context)
246 struct zpodd *zpodd = ata_dev->zpodd; 246 struct zpodd *zpodd = ata_dev->zpodd;
247 struct device *dev = &ata_dev->sdev->sdev_gendev; 247 struct device *dev = &ata_dev->sdev->sdev_gendev;
248 248
249 if (event == ACPI_NOTIFY_DEVICE_WAKE && ata_dev && 249 if (event == ACPI_NOTIFY_DEVICE_WAKE && pm_runtime_suspended(dev)) {
250 pm_runtime_suspended(dev)) {
251 zpodd->from_notify = true; 250 zpodd->from_notify = true;
252 pm_runtime_resume(dev); 251 pm_runtime_resume(dev);
253 } 252 }