scsi: esas2r: Remove redundant NULL check on buffer
authorColin Ian King <colin.king@canonical.com>
Wed, 15 Mar 2017 16:46:24 +0000 (16:46 +0000)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 16 Mar 2017 23:49:45 +0000 (19:49 -0400)
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 <colin.king@canonical.com>
Acked-by: Bradley Grove <bgrove@attotech.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/esas2r/esas2r_log.c

index a82030aa8577bdcc033c7956077f566cfdc0ca2a..65fdf22b0ba9ad4af8a4d166955956d6f164dba3 100644 (file)
@@ -130,11 +130,6 @@ static int esas2r_log_master(const long level,
 
                spin_lock_irqsave(&event_buffer_lock, flags);
 
-               if (buffer == NULL) {
-                       spin_unlock_irqrestore(&event_buffer_lock, flags);
-                       return -1;
-               }
-
                memset(buffer, 0, buflen);
 
                /*