diff options
Diffstat (limited to 'drivers/staging/most')
-rw-r--r-- | drivers/staging/most/Makefile | 2 | ||||
-rw-r--r-- | drivers/staging/most/cdev/Makefile | 2 | ||||
-rw-r--r-- | drivers/staging/most/cdev/cdev.c | 5 | ||||
-rw-r--r-- | drivers/staging/most/dim2/Makefile | 2 | ||||
-rw-r--r-- | drivers/staging/most/i2c/Makefile | 2 | ||||
-rw-r--r-- | drivers/staging/most/net/Makefile | 2 | ||||
-rw-r--r-- | drivers/staging/most/sound/Makefile | 2 | ||||
-rw-r--r-- | drivers/staging/most/usb/Makefile | 2 | ||||
-rw-r--r-- | drivers/staging/most/video/Makefile | 2 |
9 files changed, 12 insertions, 9 deletions
diff --git a/drivers/staging/most/Makefile b/drivers/staging/most/Makefile index f8bcf488ecf2..c7662f65f6db 100644 --- a/drivers/staging/most/Makefile +++ b/drivers/staging/most/Makefile @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_MOST) += most_core.o most_core-y := core.o -ccflags-y += -Idrivers/staging/ +ccflags-y += -I $(srctree)/drivers/staging/ obj-$(CONFIG_MOST_CDEV) += cdev/ obj-$(CONFIG_MOST_NET) += net/ diff --git a/drivers/staging/most/cdev/Makefile b/drivers/staging/most/cdev/Makefile index afb9870eb50f..21b0bd72c01d 100644 --- a/drivers/staging/most/cdev/Makefile +++ b/drivers/staging/most/cdev/Makefile @@ -1,4 +1,4 @@ obj-$(CONFIG_MOST_CDEV) += most_cdev.o most_cdev-objs := cdev.o -ccflags-y += -Idrivers/staging/ +ccflags-y += -I $(srctree)/drivers/staging/ diff --git a/drivers/staging/most/cdev/cdev.c b/drivers/staging/most/cdev/cdev.c index ea64aabda94e..f2b347cda8b7 100644 --- a/drivers/staging/most/cdev/cdev.c +++ b/drivers/staging/most/cdev/cdev.c @@ -453,7 +453,9 @@ static int comp_probe(struct most_interface *iface, int channel_id, c->devno = MKDEV(comp.major, current_minor); cdev_init(&c->cdev, &channel_fops); c->cdev.owner = THIS_MODULE; - cdev_add(&c->cdev, c->devno, 1); + retval = cdev_add(&c->cdev, c->devno, 1); + if (retval < 0) + goto err_free_c; c->iface = iface; c->cfg = cfg; c->channel_id = channel_id; @@ -485,6 +487,7 @@ err_free_kfifo_and_del_list: list_del(&c->list); err_del_cdev_and_free_channel: cdev_del(&c->cdev); +err_free_c: kfree(c); err_remove_ida: ida_simple_remove(&comp.minor_id, current_minor); diff --git a/drivers/staging/most/dim2/Makefile b/drivers/staging/most/dim2/Makefile index 66676f5907ee..6d15f045a767 100644 --- a/drivers/staging/most/dim2/Makefile +++ b/drivers/staging/most/dim2/Makefile @@ -1,4 +1,4 @@ obj-$(CONFIG_MOST_DIM2) += most_dim2.o most_dim2-objs := dim2.o hal.o sysfs.o -ccflags-y += -Idrivers/staging/ +ccflags-y += -I $(srctree)/drivers/staging/ diff --git a/drivers/staging/most/i2c/Makefile b/drivers/staging/most/i2c/Makefile index a7d094c1e1c2..c032fea979b3 100644 --- a/drivers/staging/most/i2c/Makefile +++ b/drivers/staging/most/i2c/Makefile @@ -1,4 +1,4 @@ obj-$(CONFIG_MOST_I2C) += most_i2c.o most_i2c-objs := i2c.o -ccflags-y += -Idrivers/staging/ +ccflags-y += -I $(srctree)/drivers/staging/ diff --git a/drivers/staging/most/net/Makefile b/drivers/staging/most/net/Makefile index 54500aa77be8..820faec6b296 100644 --- a/drivers/staging/most/net/Makefile +++ b/drivers/staging/most/net/Makefile @@ -1,4 +1,4 @@ obj-$(CONFIG_MOST_NET) += most_net.o most_net-objs := net.o -ccflags-y += -Idrivers/staging/ +ccflags-y += -I $(srctree)/drivers/staging/ diff --git a/drivers/staging/most/sound/Makefile b/drivers/staging/most/sound/Makefile index eee8774e38cb..5bb55bb108fb 100644 --- a/drivers/staging/most/sound/Makefile +++ b/drivers/staging/most/sound/Makefile @@ -1,4 +1,4 @@ obj-$(CONFIG_MOST_SOUND) += most_sound.o most_sound-objs := sound.o -ccflags-y += -Idrivers/staging/ +ccflags-y += -I $(srctree)/drivers/staging/ diff --git a/drivers/staging/most/usb/Makefile b/drivers/staging/most/usb/Makefile index 18d28cba4fbf..910cd08bad7c 100644 --- a/drivers/staging/most/usb/Makefile +++ b/drivers/staging/most/usb/Makefile @@ -1,4 +1,4 @@ obj-$(CONFIG_MOST_USB) += most_usb.o most_usb-objs := usb.o -ccflags-y += -Idrivers/staging/ +ccflags-y += -I $(srctree)/drivers/staging/ diff --git a/drivers/staging/most/video/Makefile b/drivers/staging/most/video/Makefile index 1c8e520e02a2..c6e01b6ecfe6 100644 --- a/drivers/staging/most/video/Makefile +++ b/drivers/staging/most/video/Makefile @@ -1,4 +1,4 @@ obj-$(CONFIG_MOST_VIDEO) += most_video.o most_video-objs := video.o -ccflags-y += -Idrivers/staging/ +ccflags-y += -I $(srctree)/drivers/staging/ |