提交 53637e07 编写于 作者: A Aaron Lu 提交者: Jeff Garzik

[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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NAaron Lu <aaron.lu@intel.com>
Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
上级 84a9a8cd
无相关合并请求
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部