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

media: usb: go7007: s2250-board: 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: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

authored by

Wolfram Sang and committed by
Mauro Carvalho Chehab
53f5d7a4 9524da83

+3 -3
+3 -3
drivers/media/usb/go7007/s2250-board.c
··· 505 505 struct go7007 *go = i2c_get_adapdata(adapter); 506 506 struct go7007_usb *usb = go->hpi_context; 507 507 508 - audio = i2c_new_dummy(adapter, TLV320_ADDRESS >> 1); 509 - if (audio == NULL) 510 - return -ENOMEM; 508 + audio = i2c_new_dummy_device(adapter, TLV320_ADDRESS >> 1); 509 + if (IS_ERR(audio)) 510 + return PTR_ERR(audio); 511 511 512 512 state = kzalloc(sizeof(struct s2250), GFP_KERNEL); 513 513 if (state == NULL) {