From 33bd712be7d2e3bd60262957052abc19c71c4765 Mon Sep 17 00:00:00 2001 From: Colin Ian King Date: Wed, 15 Mar 2017 16:46:24 +0000 Subject: scsi: esas2r: Remove redundant NULL check on buffer 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 Acked-by: Bradley Grove Signed-off-by: Martin K. Petersen --- drivers/scsi/esas2r/esas2r_log.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'drivers/scsi/esas2r') diff --git a/drivers/scsi/esas2r/esas2r_log.c b/drivers/scsi/esas2r/esas2r_log.c index a82030aa8577..65fdf22b0ba9 100644 --- a/drivers/scsi/esas2r/esas2r_log.c +++ b/drivers/scsi/esas2r/esas2r_log.c @@ -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); /* -- cgit v1.2.3