gpio: qpnp-pin: Fix probe cleanup code

In case of probe failure cleanup code un-registers gpio chip
without checking if chip is registered with the gpio framework.
Add a variable to maintain the gpio chip registration status and
un-register gpio chip only if the variable is set.

Change-Id: I5453fa43e1ff63b590a36151100bbfd4822a73f1
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
(cherry picked from commit 68b3121549db24c90694b2054b9506df6249b9f3)
1 file changed