diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2013-10-17 20:24:16 -0400 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2013-10-18 03:45:19 -0400 |
commit | 1120e4bfa5f9c28cb55d815ab3c6bed81dfc595c (patch) | |
tree | 0a24ba3d546bf60ea51a022028f66747b0829996 /net/bluetooth/l2cap_core.c | |
parent | 47219839b43dec0520ef1ec72122186b3aa3de97 (diff) |
Bluetooth: Use IS_ERR_OR_NULL for checking bt_debugfs
Make sure to use IS_ERR_OR_NULL for checking the existing of the root
debugfs dentry bt_debugfs.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/l2cap_core.c')
-rw-r--r-- | net/bluetooth/l2cap_core.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 8af34d2fdbef..763b7417dab7 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c | |||
@@ -6833,12 +6833,11 @@ int __init l2cap_init(void) | |||
6833 | if (err < 0) | 6833 | if (err < 0) |
6834 | return err; | 6834 | return err; |
6835 | 6835 | ||
6836 | if (bt_debugfs) { | 6836 | if (IS_ERR_OR_NULL(bt_debugfs)) |
6837 | l2cap_debugfs = debugfs_create_file("l2cap", 0444, bt_debugfs, | 6837 | return 0; |
6838 | NULL, &l2cap_debugfs_fops); | 6838 | |
6839 | if (!l2cap_debugfs) | 6839 | l2cap_debugfs = debugfs_create_file("l2cap", 0444, bt_debugfs, |
6840 | BT_ERR("Failed to create L2CAP debug file"); | 6840 | NULL, &l2cap_debugfs_fops); |
6841 | } | ||
6842 | 6841 | ||
6843 | return 0; | 6842 | return 0; |
6844 | } | 6843 | } |