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

Commit ffe4770b authored by Varka Bhadram's avatar Varka Bhadram Committed by Linus Walleij
Browse files

gpio-amd8111: check ioport_map return value



ioport_map() may fail. Its safe to check the return value.

Signed-off-by: default avatarVarka Bhadram <varkab@cdac.in>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent da9df93e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -213,6 +213,11 @@ found:
		goto out;
	}
	gp.pm = ioport_map(gp.pmbase + PMBASE_OFFSET, PMBASE_SIZE);
	if (!gp.pm) {
		dev_err(&pdev->dev, "Couldn't map io port into io memory\n");
		err = -ENOMEM;
		goto out;
	}
	gp.pdev = pdev;
	gp.chip.dev = &pdev->dev;