Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=75f6a1de41f90543792403bf0ffb3ead59d0d8cc
Commit:     75f6a1de41f90543792403bf0ffb3ead59d0d8cc
Parent:     a460ef8d0a98ac9ef6b829ae292c9b6c13bc0120
Author:     Tony Luck <[EMAIL PROTECTED]>
AuthorDate: Tue Dec 12 11:56:36 2006 -0800
Committer:  Tony Luck <[EMAIL PROTECTED]>
CommitDate: Tue Dec 12 11:56:36 2006 -0800

    [IA64] Take defensive stance on ia64_pal_get_brand_info()
    
    Stephane thought he saw a problem here (but was just confused
    by the return value from ia64_pal_get_brand_info()).  But we
    should be more defensive here in case an prototype PAL for
    a future processor doesn't implement this PAL call.
    
    Signed-off-by: Tony Luck <[EMAIL PROTECTED]>
---
 arch/ia64/kernel/setup.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index be39845..ad567b8 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -674,6 +674,7 @@ get_model_name(__u8 family, __u8 model)
 {
        char brand[128];
 
+       memcpy(brand, "Unknown", 8);
        if (ia64_pal_get_brand_info(brand)) {
                if (family == 0x7)
                        memcpy(brand, "Merced", 7);
@@ -681,8 +682,7 @@ get_model_name(__u8 family, __u8 model)
                        case 0: memcpy(brand, "McKinley", 9); break;
                        case 1: memcpy(brand, "Madison", 8); break;
                        case 2: memcpy(brand, "Madison up to 9M cache", 23); 
break;
-               } else
-                       memcpy(brand, "Unknown", 8);
+               }
        }
        if (brandname[0] == '\0')
                return strcpy(brandname, brand);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to