lkml.org 
[lkml]   [2005]   [Sep]   [8]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateThu, 8 Sep 2005 09:43:24 +0300
FromPekka Enberg <>
SubjectRe: [PATCH] Wistron laptop button driver
On 9/7/05, Miloslav Trmac <mitr@volny.cz> wrote:
> +static int __init map_bios(void)
> +{
> +     static const unsigned char __initdata signature[]
> +             = { 0x42, 0x21, 0x55, 0x30 };
> +
> +     void __iomem *base;
> +     size_t offset;
> +     uint32_t entry_point;
> +
> +     base = ioremap(0xF0000, 0x10000); /* Can't fail */

How come? ioremap can return NULL if, for example, we run out of memory.

> +     for (offset = 0; offset < 0x10000; offset += 0x10) {
> +             if (check_signature(base + offset, signature,
> +                                 sizeof(signature)) != 0)
> +                     goto found;
> +     }

                              Pekka
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-09-08 06:45    [from the cache]
©2003-2008