]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
driver core: class: Remove needless return in void API class_remove_file()
authorZijun Hu <quic_zijuhu@quicinc.com>
Sat, 8 Feb 2025 14:15:26 +0000 (22:15 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Feb 2025 11:47:56 +0000 (12:47 +0100)
Remove return since both class_remove_file() and class_remove_file_ns()
are void functions.

Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
Link: https://lore.kernel.org/r/20250208-cls_rmv_return-v1-1-091b37945aac@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/device/class.h

index 45ee3a634999331d4f9efa4c85bb1d36918eb27b..65880e60c720834f5a9cf102a93274e03300ce6c 100644 (file)
@@ -193,7 +193,7 @@ static inline int __must_check class_create_file(const struct class *class,
 static inline void class_remove_file(const struct class *class,
                                     const struct class_attribute *attr)
 {
-       return class_remove_file_ns(class, attr, NULL);
+       class_remove_file_ns(class, attr, NULL);
 }
 
 /* Simple class attribute that is just a static string */