1 From 2587791d57588562c21e5ef7e678f02ab2f3eb82 Mon Sep 17 00:00:00 2001
2 From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 Date: Tue, 22 Jan 2019 16:21:34 +0100
4 Subject: [PATCH 14/28] rt2x00: no need to check return value of debugfs_create
7 When calling debugfs functions, there is no need to ever check the
8 return value. The function can work or not, but the code logic should
9 never do something different based on this.
11 Cc: Stanislaw Gruszka <sgruszka@redhat.com>
12 Cc: Helmut Schaa <helmut.schaa@googlemail.com>
13 Cc: Kalle Valo <kvalo@codeaurora.org>
14 Cc: linux-wireless@vger.kernel.org
15 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16 Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
17 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
19 .../net/wireless/ralink/rt2x00/rt2x00debug.c | 27 -------------------
20 1 file changed, 27 deletions(-)
22 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00debug.c
23 +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00debug.c
24 @@ -656,36 +656,24 @@ void rt2x00debug_register(struct rt2x00_
26 debugfs_create_dir(intf->rt2x00dev->ops->name,
27 rt2x00dev->hw->wiphy->debugfsdir);
28 - if (IS_ERR(intf->driver_folder) || !intf->driver_folder)
32 rt2x00debug_create_file_driver("driver", intf, &intf->driver_blob);
33 - if (IS_ERR(intf->driver_entry) || !intf->driver_entry)
37 rt2x00debug_create_file_chipset("chipset",
38 intf, &intf->chipset_blob);
39 - if (IS_ERR(intf->chipset_entry) || !intf->chipset_entry)
42 intf->dev_flags = debugfs_create_file("dev_flags", 0400,
43 intf->driver_folder, intf,
44 &rt2x00debug_fop_dev_flags);
45 - if (IS_ERR(intf->dev_flags) || !intf->dev_flags)
48 intf->cap_flags = debugfs_create_file("cap_flags", 0400,
49 intf->driver_folder, intf,
50 &rt2x00debug_fop_cap_flags);
51 - if (IS_ERR(intf->cap_flags) || !intf->cap_flags)
54 intf->register_folder =
55 debugfs_create_dir("register", intf->driver_folder);
56 - if (IS_ERR(intf->register_folder) || !intf->register_folder)
59 #define RT2X00DEBUGFS_CREATE_REGISTER_ENTRY(__intf, __name) \
61 @@ -695,9 +683,6 @@ void rt2x00debug_register(struct rt2x00_
63 (__intf)->register_folder, \
64 &(__intf)->offset_##__name); \
65 - if (IS_ERR((__intf)->__name##_off_entry) || \
66 - !(__intf)->__name##_off_entry) \
69 (__intf)->__name##_val_entry = \
70 debugfs_create_file(__stringify(__name) "_value", \
71 @@ -705,9 +690,6 @@ void rt2x00debug_register(struct rt2x00_
72 (__intf)->register_folder, \
74 &rt2x00debug_fop_##__name); \
75 - if (IS_ERR((__intf)->__name##_val_entry) || \
76 - !(__intf)->__name##_val_entry) \
81 @@ -721,15 +703,10 @@ void rt2x00debug_register(struct rt2x00_
84 debugfs_create_dir("queue", intf->driver_folder);
85 - if (IS_ERR(intf->queue_folder) || !intf->queue_folder)
88 intf->queue_frame_dump_entry =
89 debugfs_create_file("dump", 0400, intf->queue_folder,
90 intf, &rt2x00debug_fop_queue_dump);
91 - if (IS_ERR(intf->queue_frame_dump_entry)
92 - || !intf->queue_frame_dump_entry)
95 skb_queue_head_init(&intf->frame_dump_skbqueue);
96 init_waitqueue_head(&intf->frame_dump_waitqueue);
97 @@ -747,10 +724,6 @@ void rt2x00debug_register(struct rt2x00_
103 - rt2x00debug_deregister(rt2x00dev);
104 - rt2x00_err(rt2x00dev, "Failed to register debug handler\n");
107 void rt2x00debug_deregister(struct rt2x00_dev *rt2x00dev)