Blackfin arch: fix cmp_label() so it doesnt incorrectly accept partial leading matches
authorMike Frysinger <vapier.adi@gmail.com>
Tue, 28 Oct 2008 07:47:11 +0000 (15:47 +0800)
committerBryan Wu <cooloney@kernel.org>
Tue, 28 Oct 2008 07:47:11 +0000 (15:47 +0800)
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
arch/blackfin/kernel/bfin_gpio.c

index a808baf5d3095cbbade21655e716ef9a4a8a8859..4aa3c053297f366208d9611a6aacfc8175a6906f 100644 (file)
@@ -256,8 +256,7 @@ static int cmp_label(unsigned short ident, const char *label)
        }
 
        if (label)
-               return strncmp(str_ident[ident].name,
-                                label, strlen(label));
+               return strcmp(str_ident[ident].name, label);
        else
                return -EINVAL;
 }