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]>
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);
}