提交 31f47073 编写于 作者: A Andrei Emeltchenko 提交者: 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: NAndrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: NMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
上级 09d5d4aa
......@@ -622,7 +622,7 @@ static int bt_seq_open(struct inode *inode, struct file *file)
sk_list = PDE(inode)->data;
s = __seq_open_private(file, &bt_seq_ops,
sizeof(struct bt_seq_state));
if (s == NULL)
if (!s)
return -ENOMEM;
s->l = sk_list;
......@@ -644,7 +644,7 @@ int bt_procfs_init(struct module* module, struct net *net, const char *name,
sk_list->fops.release = seq_release_private;
pde = proc_net_fops_create(net, name, 0, &sk_list->fops);
if (pde == NULL)
if (!pde)
return -ENOMEM;
pde->data = sk_list;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册