summaryrefslogtreecommitdiff
path: root/kernel/irq
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/irq')
-rw-r--r--kernel/irq/msi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c
index ab5e83f41188..c66787daee57 100644
--- a/kernel/irq/msi.c
+++ b/kernel/irq/msi.c
@@ -75,7 +75,9 @@ EXPORT_SYMBOL_GPL(get_cached_msi_msg);
static void msi_device_data_release(struct device *dev, void *res)
{
- WARN_ON_ONCE(!list_empty(&dev->msi_list));
+ struct msi_device_data *md = res;
+
+ WARN_ON_ONCE(!list_empty(&md->list));
dev->msi.data = NULL;
}
@@ -100,6 +102,7 @@ int msi_setup_device_data(struct device *dev)
if (!md)
return -ENOMEM;
+ INIT_LIST_HEAD(&md->list);
dev->msi.data = md;
devres_add(dev, md);
return 0;