diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2013-10-17 17:24:16 -0700 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2013-10-18 10:45:19 +0300 |
commit | 1120e4bfa5f9c28cb55d815ab3c6bed81dfc595c (patch) | |
tree | 0a24ba3d546bf60ea51a022028f66747b0829996 /net/bluetooth/sco.c | |
parent | 47219839b43dec0520ef1ec72122186b3aa3de97 (diff) | |
download | op-kernel-dev-1120e4bfa5f9c28cb55d815ab3c6bed81dfc595c.zip op-kernel-dev-1120e4bfa5f9c28cb55d815ab3c6bed81dfc595c.tar.gz |
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/sco.c')
-rw-r--r-- | net/bluetooth/sco.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c index a92aeba..12a0e51 100644 --- a/net/bluetooth/sco.c +++ b/net/bluetooth/sco.c @@ -1177,15 +1177,14 @@ int __init sco_init(void) goto error; } - if (bt_debugfs) { - sco_debugfs = debugfs_create_file("sco", 0444, bt_debugfs, - NULL, &sco_debugfs_fops); - if (!sco_debugfs) - BT_ERR("Failed to create SCO debug file"); - } - BT_INFO("SCO socket layer initialized"); + if (IS_ERR_OR_NULL(bt_debugfs)) + return 0; + + sco_debugfs = debugfs_create_file("sco", 0444, bt_debugfs, + NULL, &sco_debugfs_fops); + return 0; error: |