Blackfin arch: Fix bogus str_ident check in gpio code
authorMichael Hennerich <michael.hennerich@analog.com>
Mon, 13 Oct 2008 03:35:22 +0000 (11:35 +0800)
committerBryan Wu <cooloney@kernel.org>
Mon, 13 Oct 2008 03:35:22 +0000 (11:35 +0800)
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
arch/blackfin/kernel/bfin_gpio.c

index 12710ed180bede49142ea6e5c2e09d11052db729..6e08f425bb44076fa39443e23ab75d1db429afa1 100644 (file)
@@ -238,7 +238,7 @@ static void gpio_error(unsigned gpio)
 
 static void set_label(unsigned short ident, const char *label)
 {
-       if (label && str_ident) {
+       if (label) {
                strncpy(str_ident[ident].name, label,
                         RESOURCE_LABEL_SIZE);
                str_ident[ident].name[RESOURCE_LABEL_SIZE - 1] = 0;
@@ -247,9 +247,6 @@ static void set_label(unsigned short ident, const char *label)
 
 static char *get_label(unsigned short ident)
 {
-       if (!str_ident)
-               return "UNKNOWN";
-
        return (*str_ident[ident].name ? str_ident[ident].name : "UNKNOWN");
 }
 
@@ -260,7 +257,7 @@ static int cmp_label(unsigned short ident, const char *label)
                printk(KERN_ERR "Please provide none-null label\n");
        }
 
-       if (label && str_ident)
+       if (label)
                return strncmp(str_ident[ident].name,
                                 label, strlen(label));
        else