summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/8250/8250_exar.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/serial/8250/8250_exar.c')
-rw-r--r--drivers/tty/serial/8250/8250_exar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c
index 2737a09cf8be..42e55a8f8c69 100644
--- a/drivers/tty/serial/8250/8250_exar.c
+++ b/drivers/tty/serial/8250/8250_exar.c
@@ -1181,7 +1181,7 @@ static int xr17v35x_register_gpio(struct exar8250 *priv, struct pci_dev *pcidev,
static void xr17v35x_unregister_gpio(struct exar8250 *priv)
{
- if (priv->gpio) {
+ if (!IS_ERR_OR_NULL(priv->gpio)) {
__xr17v35x_unregister_gpio(priv->gpio);
priv->gpio = NULL;
}