pcmcia: Fix resource leaks in yenta_probe() and _close()
authorTakeshi Yoshimura <yos@sslab.ics.keio.ac.jp>
Sun, 14 Jun 2015 17:43:59 +0000 (02:43 +0900)
committerDominik Brodowski <linux@dominikbrodowski.net>
Sun, 14 Jun 2015 19:35:45 +0000 (21:35 +0200)
There are some resource leaks in yenta_probe() and _close(). I fixed
the following issues with some code cleanups. Thanks to Dominik's
suggestions.

On the error path in yenta_probe():
- a requested irq is not released
- yenta_free_resources() and pci_set_drvdata(dev, NULL) are not called

In yenta_close():
- kfree(sock) is not called
- sock->base is always set to non-NULL when yenta_close() is called,
  therefore the check in yenta_close() is not necessary.

Signed-off-by: Takeshi Yoshimura <yos@sslab.ics.keio.ac.jp>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
drivers/pcmcia/yenta_socket.c

Simple merge