diff --git a/lib/nlattr.c b/lib/nlattr.c
index 3d8295c85505..2e9774596172 100755
--- a/lib/nlattr.c
+++ b/lib/nlattr.c
@@ -374,7 +374,7 @@ EXPORT_SYMBOL(nla_memcmp);
  */
 int nla_strcmp(const struct nlattr *nla, const char *str)
 {
-	int len = strlen(str);
+	size_t len = strlen(str);
 	char *buf = nla_data(nla);
 	int attrlen = nla_len(nla);
 	int d;