Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

serial: max310x: Add error checking in probe()

Check if devm_i2c_new_dummy_device() fails.

Fixes: 2e1f2d9a9bdb ("serial: max310x: implement I2C support")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/aJTMPZiKqeXSE-KM@stanley.mountain
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Dan Carpenter and committed by
Greg Kroah-Hartman
672a37ba 3fc36ae6

+2
+2
drivers/tty/serial/max310x.c
··· 1644 1644 port_client = devm_i2c_new_dummy_device(&client->dev, 1645 1645 client->adapter, 1646 1646 port_addr); 1647 + if (IS_ERR(port_client)) 1648 + return PTR_ERR(port_client); 1647 1649 1648 1650 regcfg_i2c.name = max310x_regmap_name(i); 1649 1651 regmaps[i] = devm_regmap_init_i2c(port_client, &regcfg_i2c);