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

Commit 41b97ab5 authored by Dominik Brodowski's avatar Dominik Brodowski
Browse files

pcmcia: fix ioport size calculation in rsrc_nonstatic



Size needs to be calculated after manipulating with the start value.

Reported-by: default avatarKomuro <komurojun-mbn@nifty.com>
Signed-off-by: default avatarDominik Brodowski <linux@dominikbrodowski.net>
parent b1095afe
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -810,7 +810,7 @@ static int adjust_memory(struct pcmcia_socket *s, unsigned int action, unsigned
static int adjust_io(struct pcmcia_socket *s, unsigned int action, unsigned long start, unsigned long end)
{
	struct socket_data *data = s->resource_data;
	unsigned long size = end - start + 1;
	unsigned long size;
	int ret = 0;

#if defined(CONFIG_X86)
@@ -820,6 +820,8 @@ static int adjust_io(struct pcmcia_socket *s, unsigned int action, unsigned long
		start = 0x100;
#endif

	size = end - start + 1;

	if (end < start)
		return -EINVAL;