Commit 31f47073 authored by Andrei Emeltchenko's avatar Andrei Emeltchenko Committed by Gustavo Padovan

Bluetooth: trivial: Use preferred method for NULL check

Use standard bluetooth way to check NULL pointer !var instead of
var == NULL.
Signed-off-by: default avatarAndrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
parent 09d5d4aa
...@@ -622,7 +622,7 @@ static int bt_seq_open(struct inode *inode, struct file *file) ...@@ -622,7 +622,7 @@ static int bt_seq_open(struct inode *inode, struct file *file)
sk_list = PDE(inode)->data; sk_list = PDE(inode)->data;
s = __seq_open_private(file, &bt_seq_ops, s = __seq_open_private(file, &bt_seq_ops,
sizeof(struct bt_seq_state)); sizeof(struct bt_seq_state));
if (s == NULL) if (!s)
return -ENOMEM; return -ENOMEM;
s->l = sk_list; s->l = sk_list;
...@@ -644,7 +644,7 @@ int bt_procfs_init(struct module* module, struct net *net, const char *name, ...@@ -644,7 +644,7 @@ int bt_procfs_init(struct module* module, struct net *net, const char *name,
sk_list->fops.release = seq_release_private; sk_list->fops.release = seq_release_private;
pde = proc_net_fops_create(net, name, 0, &sk_list->fops); pde = proc_net_fops_create(net, name, 0, &sk_list->fops);
if (pde == NULL) if (!pde)
return -ENOMEM; return -ENOMEM;
pde->data = sk_list; pde->data = sk_list;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment