AddInputDevice: only need to check once if we failed to calloc dev

Resolves warning from Oracle Parfait static analyser:

Warning: Impossible or redundant condition
   Impossible or redundant condition [impossible-redundant-condition]:
      Condition 'dev != NULL' of branch is determined by previous branch
        at line 270 of dix/devices.c in function 'AddInputDevice'.
          Condition 'dev != NULL' from this branch implies following branch is always true at line 262

Fixes: commit 493ad83323
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
Alan Coopersmith 2020-11-01 13:38:21 -08:00
parent 250db8708a
commit d00594ebc7
1 changed files with 0 additions and 3 deletions

View File

@ -267,9 +267,6 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart)
return NULL;
}
if (!dev)
return (DeviceIntPtr) NULL;
dev->last.scroll = NULL;
dev->last.touches = NULL;
dev->id = devid;