brcm2708: add kernel 4.14 support
[openwrt/staging/chunkeey.git] / target / linux / brcm2708 / patches-4.14 / 950-0140-staging-vchiq_arm-Make-debugfs-failure-non-fatal.patch
1 From a200e0d898cd6396061e3a1901ac73df389b6e3d Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Tue, 12 Dec 2017 12:12:46 +0000
4 Subject: [PATCH 140/454] staging: vchiq_arm: Make debugfs failure non-fatal
5
6 It can be useful to be able to open multiple vchiq instances in a
7 single process. This currently fails due to a debugfs collision,
8 so make such a failure non-fatal.
9
10 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
11 ---
12 .../staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 6 +-----
13 1 file changed, 1 insertion(+), 5 deletions(-)
14
15 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
16 +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
17 @@ -1754,11 +1754,7 @@ vchiq_open(struct inode *inode, struct f
18 instance->state = state;
19 instance->pid = current->tgid;
20
21 - ret = vchiq_debugfs_add_instance(instance);
22 - if (ret != 0) {
23 - kfree(instance);
24 - return ret;
25 - }
26 + (void)vchiq_debugfs_add_instance(instance);
27
28 sema_init(&instance->insert_event, 0);
29 sema_init(&instance->remove_event, 0);