Commit a99009bc authored by Mihai Carabas's avatar Mihai Carabas Committed by Greg Kroah-Hartman

misc/pvpanic: fix set driver data

Add again dev_set_drvdata(), but this time in devm_pvpanic_probe(), in order
for dev_get_drvdata() to not return NULL.

Fixes: 394febc9 ("misc/pvpanic: Make 'pvpanic_probe()' resource managed")
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarMihai Carabas <mihai.carabas@oracle.com>
Link: https://lore.kernel.org/r/1629385946-4584-2-git-send-email-mihai.carabas@oracle.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a30dc6cf
...@@ -85,6 +85,8 @@ int devm_pvpanic_probe(struct device *dev, struct pvpanic_instance *pi) ...@@ -85,6 +85,8 @@ int devm_pvpanic_probe(struct device *dev, struct pvpanic_instance *pi)
list_add(&pi->list, &pvpanic_list); list_add(&pi->list, &pvpanic_list);
spin_unlock(&pvpanic_lock); spin_unlock(&pvpanic_lock);
dev_set_drvdata(dev, pi);
return devm_add_action_or_reset(dev, pvpanic_remove, pi); return devm_add_action_or_reset(dev, pvpanic_remove, pi);
} }
EXPORT_SYMBOL_GPL(devm_pvpanic_probe); EXPORT_SYMBOL_GPL(devm_pvpanic_probe);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment