mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
43aac03aaa
commit
c8d2d20e0c
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue