aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/DAC960.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c
index c77b6f3c28ea..6fa7b0fdbdfd 100644
--- a/drivers/block/DAC960.c
+++ b/drivers/block/DAC960.c
@@ -6562,7 +6562,7 @@ static int DAC960_ProcWriteUserCommand(struct file *file,
6562 if (copy_from_user(CommandBuffer, Buffer, Count)) return -EFAULT; 6562 if (copy_from_user(CommandBuffer, Buffer, Count)) return -EFAULT;
6563 CommandBuffer[Count] = '\0'; 6563 CommandBuffer[Count] = '\0';
6564 Length = strlen(CommandBuffer); 6564 Length = strlen(CommandBuffer);
6565 if (CommandBuffer[Length-1] == '\n') 6565 if (Length > 0 && CommandBuffer[Length-1] == '\n')
6566 CommandBuffer[--Length] = '\0'; 6566 CommandBuffer[--Length] = '\0';
6567 if (Controller->FirmwareType == DAC960_V1_Controller) 6567 if (Controller->FirmwareType == DAC960_V1_Controller)
6568 return (DAC960_V1_ExecuteUserCommand(Controller, CommandBuffer) 6568 return (DAC960_V1_ExecuteUserCommand(Controller, CommandBuffer)