diff options
author | Georgiana Chelu <georgiana.chelu93@gmail.com> | 2017-09-22 10:52:13 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-09-22 11:53:45 +0300 |
commit | c8d2d20e0c02f2226b65af1c955f600003f83503 (patch) | |
tree | 96e7cd9438563019689ca7e674b5a4a5d6e025ea /drivers/staging/irda | |
parent | 43aac03aaac35343f6c9a0a9b8159bd1a7fcdeda (diff) | |
download | linux-c8d2d20e0c02f2226b65af1c955f600003f83503.tar.xz |
Staging: irda: net: Use NOT operator instead of comparison to NULL
Fix issues find by checkpatch.pl.
CHECK: Comparison to NULL could be written "!dongles"
CHECK: Comparison to NULL could be written "!tasks"
Signed-off-by: Georgiana Chelu <georgiana.chelu93@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/irda')
-rw-r--r-- | drivers/staging/irda/net/irda_device.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/irda/net/irda_device.c b/drivers/staging/irda/net/irda_device.c index 35014782f949..944eeaa12c93 100644 --- a/drivers/staging/irda/net/irda_device.c +++ b/drivers/staging/irda/net/irda_device.c @@ -62,14 +62,14 @@ static void irda_task_timer_expired(void *data); int __init irda_device_init( void) { dongles = hashbin_new(HB_NOLOCK); - if (dongles == NULL) { + if (!dongles) { net_warn_ratelimited("IrDA: Can't allocate dongles hashbin!\n"); return -ENOMEM; } spin_lock_init(&dongles->hb_spinlock); tasks = hashbin_new(HB_LOCK); - if (tasks == NULL) { + if (!tasks) { net_warn_ratelimited("IrDA: Can't allocate tasks hashbin!\n"); hashbin_delete(dongles, NULL); return -ENOMEM; |