parport_pc: release IO region properly if unsupported ITE887x card is found
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: Jiri Kosina <ed58f755cc8caaf10c3e8c731a8b86fb8f13d6cb@suse.cz>
Acked-by: Niels de Vos <7bda0c0ee7f47171cc808e9e60292cbc5d8140dd@redhat.com>
Cc: Bjorn Helgaas <10beeee9ebfac68af8330145c8378a1d1bb2a283@hp.com>
Cc: Alan Cox <91e38e63b890fbb214c8914809fde03c73e7f24d@linux.intel.com>
Cc: Joe Krahn <e9c1217cbbdfaf0bd41dcb81b07adaa7473430bc@niehs.nih.gov>
Signed-off-by: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@google.com>
Signed-off-by: Greg Kroah-Hartman <4645f7897fd33786a2ee1264d590b3c400559d85@suse.de>

KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs