summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2017-03-15 17:46:24 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2017-03-17 00:49:45 +0100
commit33bd712be7d2e3bd60262957052abc19c71c4765 (patch)
treed4c431fa29a47a9b0c147615dc02e57f37201ccc /drivers
parentscsi: remove incorrect __exit markups (diff)
downloadlinux-33bd712be7d2e3bd60262957052abc19c71c4765.tar.xz
linux-33bd712be7d2e3bd60262957052abc19c71c4765.zip
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 <colin.king@canonical.com> Acked-by: Bradley Grove <bgrove@attotech.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/esas2r/esas2r_log.c5
1 files changed, 0 insertions, 5 deletions
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);
/*