aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/macintosh/macio_sysfs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/macintosh/macio_sysfs.c b/drivers/macintosh/macio_sysfs.c
index 8566bdfdd4b8..0a5647fb8569 100644
--- a/drivers/macintosh/macio_sysfs.c
+++ b/drivers/macintosh/macio_sysfs.c
@@ -53,12 +53,14 @@ static ssize_t modalias_show (struct device *dev, struct device_attribute *attr,
53 buf += length; 53 buf += length;
54 while (cplen > 0) { 54 while (cplen > 0) {
55 int l; 55 int l;
56 length += sprintf (buf, "C%s", compat); 56 l = sprintf (buf, "C%s", compat);
57 buf += length; 57 length += l;
58 buf += l;
58 l = strlen (compat) + 1; 59 l = strlen (compat) + 1;
59 compat += l; 60 compat += l;
60 cplen -= l; 61 cplen -= l;
61 } 62 }
63 length += sprintf(buf, "\n");
62 64
63 return length; 65 return length;
64} 66}