From 53637e0760d56274177be7e6d630490bc49766c1 Mon Sep 17 00:00:00 2001 From: Aaron Lu Date: Mon, 28 Jan 2013 13:08:02 +0800 Subject: [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 Signed-off-by: Aaron Lu Signed-off-by: Jeff Garzik --- drivers/ata/libata-zpodd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/ata/libata-zpodd.c b/drivers/ata/libata-zpodd.c index a7df6038353..90b159b740b 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) 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); } -- cgit v1.2.3