]> git.proxmox.com Git - grub2.git/commitdiff
2009-09-04 Vladimir Serbinenko <phcoder@gmail.com>
authorphcoder <phcoder@localhost>
Fri, 4 Sep 2009 13:16:07 +0000 (13:16 +0000)
committerphcoder <phcoder@localhost>
Fri, 4 Sep 2009 13:16:07 +0000 (13:16 +0000)
* loader/i386/xnu.c (grub_cpu_xnu_fill_devicetree): Remove
unnecessary calls to grub_error.

ChangeLog
loader/i386/xnu.c

index 826bbc2b8a1a23eeb829da5cfc479d66807755d8..7d4946b6ebcc794592208c77c39655632d437647 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-09-04  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * loader/i386/xnu.c (grub_cpu_xnu_fill_devicetree): Remove
+       unnecessary calls to grub_error.
+
 2009-09-04  Colin Watson  <cjwatson@ubuntu.com>
 
        * NEWS: Mention `keystatus' and Unicode fonts.
index 06e375c69ccf193ff2f7038f6320b474baa87829..39b02c7a3aa19e58a317849ecbbbd0b782701a67 100644 (file)
@@ -247,7 +247,7 @@ grub_cpu_xnu_fill_devicetree (void)
   curval->datasize = (SYSTEM_TABLE_SIZEOF (firmware_revision));
   curval->data = grub_malloc (curval->datasize);
   if (! curval->data)
-    return grub_error (GRUB_ERR_OUT_OF_MEMORY, "couldn't create device tree");
+    return grub_errno;
   grub_memcpy (curval->data, (SYSTEM_TABLE_VAR(firmware_revision)),
               curval->datasize);
 
@@ -268,7 +268,7 @@ grub_cpu_xnu_fill_devicetree (void)
   curval->datasize = sizeof ("EFI32");
   curval->data = grub_malloc (curval->datasize);
   if (! curval->data)
-    return grub_error (GRUB_ERR_OUT_OF_MEMORY, "couldn't create device tree");
+    return grub_errno;
   if (SIZEOF_OF_UINTN == 4)
     grub_memcpy (curval->data, "EFI32", curval->datasize);
   else
@@ -287,7 +287,7 @@ grub_cpu_xnu_fill_devicetree (void)
   curval->datasize = sizeof (grub_uint64_t);
   curval->data = grub_malloc (curval->datasize);
   if (!curval->data)
-    return grub_error (GRUB_ERR_OUT_OF_MEMORY, "couldn't create device tree");
+    return grub_errno;
 
   /* First see if user supplies the value. */
   char *fsbvar = grub_env_get ("fsb");
@@ -373,8 +373,7 @@ grub_cpu_xnu_fill_devicetree (void)
       curval->datasize = SIZEOF_OF_UINTN;
       curval->data = grub_malloc (curval->datasize);
       if (! curval->data)
-       return grub_error (GRUB_ERR_OUT_OF_MEMORY,
-                          "couldn't create device tree");
+       return grub_errno;
       if (SIZEOF_OF_UINTN == 4)
        *((grub_uint32_t *)curval->data) = PTR_TO_UINT32 (ptr);
       else
@@ -392,8 +391,7 @@ grub_cpu_xnu_fill_devicetree (void)
          curval->datasize = grub_strlen (table_aliases[j].name) + 1;
          curval->data = grub_malloc (curval->datasize);
          if (!curval->data)
-           return grub_error (GRUB_ERR_OUT_OF_MEMORY,
-                              "couldn't create device tree");
+           return grub_errno;
          grub_memcpy (curval->data, table_aliases[j].name, curval->datasize);
        }
     }
@@ -409,8 +407,7 @@ grub_cpu_xnu_fill_devicetree (void)
   curval->datasize = SIZEOF_OF_UINTN;
   curval->data = grub_malloc (curval->datasize);
   if (! curval->data)
-    return grub_error (GRUB_ERR_OUT_OF_MEMORY,
-                      "couldn't create device tree");
+    return grub_errno;
   if (SIZEOF_OF_UINTN == 4)
     *((grub_uint32_t *) curval->data)
       = PTR_TO_UINT32 (SYSTEM_TABLE_PTR (runtime_services));