Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d5185c4e authored by Damian Hobson-Garcia's avatar Damian Hobson-Garcia Committed by Greg Kroah-Hartman
Browse files

drivers: uio: Only allocate new private data when probing device tree node



The same condition should be used both when allocating and freeing the
driver private data.  When dev.of_node is non NULL, allocate a new
private data structure, otherwise use the values from the platform data.

Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: default avatarDamian Hobson-Garcia <dhobsong@igel.co.jp>
Cc: "Hans J. Koch" <hjk@hansjkoch.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 439926c8
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -153,7 +153,7 @@ static int uio_dmem_genirq_probe(struct platform_device *pdev)
	int ret = -EINVAL;
	int ret = -EINVAL;
	int i;
	int i;


	if (!uioinfo) {
	if (pdev->dev.of_node) {
		int irq;
		int irq;


		/* alloc uioinfo for one device */
		/* alloc uioinfo for one device */
+1 −1
Original line number Original line Diff line number Diff line
@@ -102,7 +102,7 @@ static int uio_pdrv_genirq_probe(struct platform_device *pdev)
	int ret = -EINVAL;
	int ret = -EINVAL;
	int i;
	int i;


	if (!uioinfo) {
	if (pdev->dev.of_node) {
		int irq;
		int irq;


		/* alloc uioinfo for one device */
		/* alloc uioinfo for one device */