diff --git a/[refs] b/[refs] index 7e0956d812e5..9ba80838ac7f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f7a595e98c3140f1271957aa742a6b84407620d4 +refs/heads/master: ff8147fe71246b81a48de5f37041b026b57d60ca diff --git a/trunk/drivers/video/au1100fb.c b/trunk/drivers/video/au1100fb.c index 378f27745a1d..a699aab63820 100644 --- a/trunk/drivers/video/au1100fb.c +++ b/trunk/drivers/video/au1100fb.c @@ -715,8 +715,11 @@ int au1100fb_setup(char *options) } /* Mode option (only option that start with digit) */ else if (isdigit(this_opt[0])) { - mode = kmalloc(strlen(this_opt) + 1, GFP_KERNEL); - strncpy(mode, this_opt, strlen(this_opt) + 1); + mode = kstrdup(this_opt, GFP_KERNEL); + if (!mode) { + print_err("memory allocation failed"); + return -ENOMEM; + } } /* Unsupported option */ else {