]> Git Repo - linux.git/commitdiff
[libata] fix smatch warning for zpodd_wake_dev
authorAaron Lu <[email protected]>
Mon, 28 Jan 2013 05:08:02 +0000 (13:08 +0800)
committerJeff Garzik <[email protected]>
Wed, 20 Feb 2013 22:14:03 +0000 (17:14 -0500)
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 <[email protected]>
Signed-off-by: Aaron Lu <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
drivers/ata/libata-zpodd.c

index a7df60383532736a4c16c358c948a9cd84cd93b7..90b159b740b3fd1f9153f371a84fa803c17ee4d6 100644 (file)
@@ -246,8 +246,7 @@ static void zpodd_wake_dev(acpi_handle handle, u32 event, void *context)
        struct zpodd *zpodd = ata_dev->zpodd;
        struct device *dev = &ata_dev->sdev->sdev_gendev;
 
-       if (event == ACPI_NOTIFY_DEVICE_WAKE && ata_dev &&
-                       pm_runtime_suspended(dev)) {
+       if (event == ACPI_NOTIFY_DEVICE_WAKE && pm_runtime_suspended(dev)) {
                zpodd->from_notify = true;
                pm_runtime_resume(dev);
        }
This page took 0.058523 seconds and 4 git commands to generate.