aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/laptops/freefall.c
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/laptops/freefall.c')
-rw-r--r--Documentation/laptops/freefall.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Documentation/laptops/freefall.c b/Documentation/laptops/freefall.c
index aab2ff09e868..d4173186555c 100644
--- a/Documentation/laptops/freefall.c
+++ b/Documentation/laptops/freefall.c
@@ -34,6 +34,7 @@ static int set_unload_heads_path(char *device)
34 if (strlen(device) <= 5 || strncmp(device, "/dev/", 5) != 0) 34 if (strlen(device) <= 5 || strncmp(device, "/dev/", 5) != 0)
35 return -EINVAL; 35 return -EINVAL;
36 strncpy(devname, device + 5, sizeof(devname) - 1); 36 strncpy(devname, device + 5, sizeof(devname) - 1);
37 devname[sizeof(devname) - 1] = '\0';
37 strncpy(device_path, device, sizeof(device_path) - 1); 38 strncpy(device_path, device, sizeof(device_path) - 1);
38 39
39 snprintf(unload_heads_path, sizeof(unload_heads_path) - 1, 40 snprintf(unload_heads_path, sizeof(unload_heads_path) - 1,