Message ID | 20200221064127.16848-5-shrirang.bagul@canonical.com |
---|---|
State | New |
Headers | show |
Series | Support Intel Atom (Baytrail-I) HS-UART serdev slaves over tty | expand |
diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c index e089a8dda467..fbf3abf74479 100644 --- a/drivers/tty/serdev/core.c +++ b/drivers/tty/serdev/core.c @@ -273,8 +273,8 @@ static int serdev_drv_probe(struct device *dev) static int serdev_drv_remove(struct device *dev) { const struct serdev_device_driver *sdrv = to_serdev_device_driver(dev->driver); - - sdrv->remove(to_serdev_device(dev)); + if (sdrv->remove) + sdrv->remove(to_serdev_device(dev)); return 0; }