summaryrefslogtreecommitdiff
path: root/drivers/misc
diff options
context:
space:
mode:
authorMihai Carabas <mihai.carabas@oracle.com>2021-08-19 18:12:26 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-08-27 16:22:26 +0200
commita99009bc4f2f0b46e6c553704fda0b67e04395f5 (patch)
tree432ae964b9cff943d039b6d79747b9bf846acff1 /drivers/misc
parenta30dc6cf0dc51419021550152e435736aaef8799 (diff)
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@linux.intel.com> Signed-off-by: Mihai Carabas <mihai.carabas@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@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/pvpanic/pvpanic.c2
1 files changed, 2 insertions, 0 deletions
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);