Buffer is a pointer to the static char array event_buffer and therefore
can never be null, so the check is redundant. Remove it.
Detected by CoverityScan, CID#
1077556 ("Logically Dead Code")
Signed-off-by: Colin Ian King <[email protected]>
Acked-by: Bradley Grove <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
spin_lock_irqsave(&event_buffer_lock, flags);
- if (buffer == NULL) {
- spin_unlock_irqrestore(&event_buffer_lock, flags);
- return -1;
- }
-
memset(buffer, 0, buflen);
/*