1 From d0699f781e96df6c1fd10551c92fa27695b297da Mon Sep 17 00:00:00 2001
2 From: Christian Marangi <ansuelsmth@gmail.com>
3 Date: Fri, 12 May 2023 20:19:45 +0200
4 Subject: [PATCH 3/6] dahdi-sysfs-chan: fix bug if clause does not guard
6 Fix bug if clause does not guard by a typo by missing the if clause and
7 not correctly removing the device.
9 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
11 drivers/dahdi/dahdi-sysfs-chan.c | 3 ++-
12 1 file changed, 2 insertions(+), 1 deletion(-)
14 --- a/drivers/dahdi/dahdi-sysfs-chan.c
15 +++ b/drivers/dahdi/dahdi-sysfs-chan.c
16 @@ -381,10 +381,11 @@ static void fixed_devfiles_remove(void)
18 for (i = 0; i < ARRAY_SIZE(fixed_minors); i++) {
19 void *d = fixed_minors[i].dev;
20 - if (d && !IS_ERR(d))
21 + if (d && !IS_ERR(d)) {
22 dahdi_dbg(DEVICES, "Removing fixed device file %s\n",
23 fixed_minors[i].name);
24 DEL_DAHDI_DEV(fixed_minors[i].minor);