Skip to content

Commit a99009b

Browse files
mcarabasgregkh
authored andcommitted
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: 394febc ("misc/pvpanic: Make 'pvpanic_probe()' resource managed") Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Mihai Carabas <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent a30dc6c commit a99009b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/misc/pvpanic/pvpanic.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ int devm_pvpanic_probe(struct device *dev, struct pvpanic_instance *pi)
8585
list_add(&pi->list, &pvpanic_list);
8686
spin_unlock(&pvpanic_lock);
8787

88+
dev_set_drvdata(dev, pi);
89+
8890
return devm_add_action_or_reset(dev, pvpanic_remove, pi);
8991
}
9092
EXPORT_SYMBOL_GPL(devm_pvpanic_probe);

0 commit comments

Comments
 (0)