diff options
-rw-r--r-- | drivers/usb/typec/stusb160x.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/typec/stusb160x.c b/drivers/usb/typec/stusb160x.c index 7143852ce94d..da7f1957bcb3 100644 --- a/drivers/usb/typec/stusb160x.c +++ b/drivers/usb/typec/stusb160x.c @@ -730,8 +730,8 @@ static int stusb160x_probe(struct i2c_client *client) } chip->port = typec_register_port(chip->dev, &chip->capability); - if (!chip->port) { - ret = -ENODEV; + if (IS_ERR(chip->port)) { + ret = PTR_ERR(chip->port); goto all_reg_disable; } |