lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1629301110-2714-2-git-send-email-mihai.carabas@oracle.com>
Date:   Wed, 18 Aug 2021 18:38:30 +0300
From:   Mihai Carabas <mihai.carabas@...cle.com>
To:     arnd@...db.de, gregkh@...uxfoundation.org,
        andriy.shevchenko@...ux.intel.com, christophe.jaillet@...adoo.fr,
        mihai.carabas@...cle.com, linux-kernel@...r.kernel.org
Subject: [PATCH] misc/pvpanic: fix set driver data

Add again dev_set_drvdata in order for dev_get_drvdata to not return NULL.

Fixes: 394febc9d0a6 ("misc/pvpanic: Make 'pvpanic_probe()' resource managed")

Signed-off-by: Mihai Carabas <mihai.carabas@...cle.com>
---
 drivers/misc/pvpanic/pvpanic-mmio.c | 2 ++
 drivers/misc/pvpanic/pvpanic-pci.c  | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/drivers/misc/pvpanic/pvpanic-mmio.c b/drivers/misc/pvpanic/pvpanic-mmio.c
index be40160..874f94e 100644
--- a/drivers/misc/pvpanic/pvpanic-mmio.c
+++ b/drivers/misc/pvpanic/pvpanic-mmio.c
@@ -104,6 +104,8 @@ static int pvpanic_mmio_probe(struct platform_device *pdev)
 	pi->capability &= ioread8(base);
 	pi->events = pi->capability;
 
+	dev_set_drvdata(dev, pi);
+
 	return devm_pvpanic_probe(dev, pi);
 }
 
diff --git a/drivers/misc/pvpanic/pvpanic-pci.c b/drivers/misc/pvpanic/pvpanic-pci.c
index a43c401..2a26db8 100644
--- a/drivers/misc/pvpanic/pvpanic-pci.c
+++ b/drivers/misc/pvpanic/pvpanic-pci.c
@@ -96,6 +96,8 @@ static int pvpanic_pci_probe(struct pci_dev *pdev,
 	pi->capability &= ioread8(base);
 	pi->events = pi->capability;
 
+	dev_set_drvdata(dev, pi);
+
 	return devm_pvpanic_probe(&pdev->dev, pi);
 }
 
-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ