[Devel] [PATCH RHEL9 COMMIT] ms/misc/pvpanic: fix set driver data
Konstantin Khorenko
khorenko at virtuozzo.com
Fri Nov 12 19:32:37 MSK 2021
The commit is pushed to "branch-rh9-5.14.vz9.1.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh9-5.14.0-4.vz9.10.26
------>
commit a585147fdae22083dd7a4a7c2fc6dbd115f0694b
Author: Mihai Carabas <mihai.carabas at oracle.com>
Date: Fri Nov 12 19:32:37 2021 +0300
ms/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: 394febc9d0a6 ("misc/pvpanic: Make 'pvpanic_probe()' resource managed")
Reviewed-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
Signed-off-by: Mihai Carabas <mihai.carabas at oracle.com>
Link: https://lore.kernel.org/r/1629385946-4584-2-git-send-email-mihai.carabas@oracle.com
Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
ms commit: a99009bc4f2f ("misc/pvpanic: fix set driver data")
https://jira.sw.ru/browse/PSBM-135358
Signed-off-by: Nikita Yushchenko <nikita.yushchenko at virtuozzo.com>
---
drivers/misc/pvpanic/pvpanic.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/misc/pvpanic/pvpanic.c b/drivers/misc/pvpanic/pvpanic.c
index 02b807c788c9..bb7aa6368538 100644
--- a/drivers/misc/pvpanic/pvpanic.c
+++ b/drivers/misc/pvpanic/pvpanic.c
@@ -85,6 +85,8 @@ int devm_pvpanic_probe(struct device *dev, struct pvpanic_instance *pi)
list_add(&pi->list, &pvpanic_list);
spin_unlock(&pvpanic_lock);
+ dev_set_drvdata(dev, pi);
+
return devm_add_action_or_reset(dev, pvpanic_remove, pi);
}
EXPORT_SYMBOL_GPL(devm_pvpanic_probe);
More information about the Devel
mailing list