Merge tag 'sound-5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
[linux-2.6-microblaze.git] / lib / nlattr.c
index 5b6116e..1d051ef 100644 (file)
@@ -828,7 +828,7 @@ int nla_strcmp(const struct nlattr *nla, const char *str)
        int attrlen = nla_len(nla);
        int d;
 
-       if (attrlen > 0 && buf[attrlen - 1] == '\0')
+       while (attrlen > 0 && buf[attrlen - 1] == '\0')
                attrlen--;
 
        d = attrlen - len;