Skip to content
Commit dad459e0 authored by Tiezhu Yang's avatar Tiezhu Yang Committed by Greg Kroah-Hartman
Browse files

staging: rtlwifi: use single_open and single_release properly



single_open() returns -ENOMEM when malloc failed, so the caller function
rtl_debugfs_open_rw() should not always return 0. In addition, when using
single_open(), we should use single_release() instead of seq_release() in
the file_operations structure to avoid a memory leak.

Signed-off-by: default avatarTiezhu Yang <kernelpatch@126.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bb1192cb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment