diff --git a/ChangeLog b/ChangeLog index 826bbc2b8..7d4946b6e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-09-04 Vladimir Serbinenko + + * loader/i386/xnu.c (grub_cpu_xnu_fill_devicetree): Remove + unnecessary calls to grub_error. + 2009-09-04 Colin Watson * NEWS: Mention `keystatus' and Unicode fonts. diff --git a/loader/i386/xnu.c b/loader/i386/xnu.c index 06e375c69..39b02c7a3 100644 --- a/loader/i386/xnu.c +++ b/loader/i386/xnu.c @@ -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));