]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/acpi/sleep/proc.c
Merge branches 'release', 'bugzilla-6217', 'bugzilla-6629', 'bugzilla-6933', 'bugzill...
[linux-2.6-omap-h63xx.git] / drivers / acpi / sleep / proc.c
index e19eb0c25e62447388571e237e89e441951c74ff..f8df5217d477ee525c30f4c1050bf7cc8eb6e35b 100644 (file)
@@ -178,6 +178,9 @@ static int get_date_field(char **p, u32 * value)
         * Try to find delimeter, only to insert null.  The end of the
         * string won't have one, but is still valid.
         */
+       if (*p == NULL)
+               return result;
+
        next = strpbrk(*p, "- :");
        if (next)
                *next++ = '\0';
@@ -190,6 +193,8 @@ static int get_date_field(char **p, u32 * value)
 
        if (next)
                *p = next;
+       else
+               *p = NULL;
 
        return result;
 }