Skip to content

Commit

Permalink
Bluetooth: trivial: Use preferred method for NULL check
Browse files Browse the repository at this point in the history
Use standard bluetooth way to check NULL pointer !var instead of
var == NULL.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
  • Loading branch information
Andrei Emeltchenko authored and Gustavo Padovan committed Aug 21, 2012
1 parent 09d5d4a commit 31f4707
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/bluetooth/af_bluetooth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 31f4707

Please sign in to comment.