提交 33bd712b 编写于 作者: C Colin Ian King 提交者: Martin K. Petersen

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: NColin Ian King <colin.king@canonical.com>
Acked-by: NBradley Grove <bgrove@attotech.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 ba21222d
......@@ -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);
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册