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

Skip to content
Commit 9fdbdd06 authored by Jiri Kosina's avatar Jiri Kosina Committed by Greg Kroah-Hartman
Browse files

parport_pc: release IO region properly if unsupported ITE887x card is found



sio_ite_8872_probe() bails out if it detects no-parallel (1S, 2S) or
unknown card.

It doesn't call release_region() on the previously allocated resource
though.  This causes

  (a) leak of the resource
  (b) kernel oops when parport module is removed and /proc/ioports is read. This
      is because the string that has been associated to the IO port region
      is a static char array inside the already removed module.

Let's call release_region() properly before baling out.

Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
Acked-by: default avatarNiels de Vos <ndevos@redhat.com>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Joe Krahn <krahn@niehs.nih.gov>
Signed-off-by: default avatarAndrew Morton <akpm@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 8193c429
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment