summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_pm.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2012-05-10 02:32:01 +0200
committerGrant Likely <grant.likely@secretlab.ca>2012-05-10 02:32:01 +0200
commit3aa450c063e29b4f4b622480e1779e5e256d8f8f (patch)
treed18942ff8bf862f2973f4e7adbf99c4f3e22a563 /drivers/gpu/drm/nouveau/nouveau_pm.c
parentspi/devicetree: Move devicetree support code into spi directory (diff)
parentLinux 3.4-rc6 (diff)
downloadlinux-3aa450c063e29b4f4b622480e1779e5e256d8f8f.tar.xz
linux-3aa450c063e29b4f4b622480e1779e5e256d8f8f.zip
Merge tag 'v3.4-rc6' into spi/next
Linux 3.4-rc6
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_pm.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_pm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.c b/drivers/gpu/drm/nouveau/nouveau_pm.c
index 34d591b7d4ef..da3e7c3abab7 100644
--- a/drivers/gpu/drm/nouveau/nouveau_pm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_pm.c
@@ -235,6 +235,7 @@ nouveau_pm_profile_set(struct drm_device *dev, const char *profile)
return -EPERM;
strncpy(string, profile, sizeof(string));
+ string[sizeof(string) - 1] = 0;
if ((ptr = strchr(string, '\n')))
*ptr = '\0';