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

Commit e3e79454 authored by Paul Mundt's avatar Paul Mundt
Browse files

sh: pfc: Ignore pinmux GPIOs with invalid enum IDs.



If we encounter invalid entries in the pinmux GPIO range, make sure we've
still got a dummy pin definition but don't otherwise map it.

Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 1acbbb4e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -338,6 +338,10 @@ static int __devinit sh_pfc_map_gpios(struct sh_pfc *pfc,
		pin->number = pfc->first_gpio + i;
		pin->name = gpio->name;

		/* XXX */
		if (unlikely(!gpio->enum_id))
			continue;

		sh_pfc_map_one_gpio(pfc, pmx, gpio, i);
	}