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

extcon: extcon-max77843: convert to i2c_new_dummy_device

Move from i2c_new_dummy() to i2c_new_dummy_device(), so we now get an
ERRPTR which we use in error handling.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>

authored by

Wolfram Sang and committed by
Chanwoo Choi
a6d9cfcb a104dbc5

+3 -3
+3 -3
drivers/extcon/extcon-max77843.c
··· 774 774 { 775 775 int ret; 776 776 777 - max77843->i2c_muic = i2c_new_dummy(max77843->i2c->adapter, 777 + max77843->i2c_muic = i2c_new_dummy_device(max77843->i2c->adapter, 778 778 I2C_ADDR_MUIC); 779 - if (!max77843->i2c_muic) { 779 + if (IS_ERR(max77843->i2c_muic)) { 780 780 dev_err(&max77843->i2c->dev, 781 781 "Cannot allocate I2C device for MUIC\n"); 782 - return -ENOMEM; 782 + return PTR_ERR(max77843->i2c_muic); 783 783 } 784 784 785 785 i2c_set_clientdata(max77843->i2c_muic, max77843);