[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090206152121.3ae5208a.akpm@linux-foundation.org>
Date: Fri, 6 Feb 2009 15:21:21 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Alessandro Zummo <alessandro.zummo@...ertech.it>
Cc: linux-kernel@...r.kernel.org, rpurdie@...ys.net, mingo@...e.hu,
tglx@...utronix.de, hpa@...or.com
Subject: Re: [PATCH] Soekris net5501 board support code
On Thu, 5 Feb 2009 16:13:19 +0100
Alessandro Zummo <alessandro.zummo@...ertech.it> wrote:
> +static int __init soekris_init(void)
> +{
> + int i;
> + unsigned char *rombase, *bios;
> +
> + if (!is_geode() || geode_has_vsa2())
> + return 0;
> +
> + rombase = ioremap(0xffff0000, 0xffff);
> + if (!rombase)
> + return 0;
Is it appropriate to silently "succeed" if the ioremap() failed?
> + bios = rombase + 0x20; /* null terminated */
> +
> + if (strncmp(bios, "comBIOS", 7))
> + goto unmap;
> +
> + for (i = 0; i < ARRAY_SIZE(boards); i++) {
> + unsigned char *model = rombase + boards[i].offset;
> +
> + if (strncmp(model, boards[i].sig, boards[i].len) == 0) {
> + printk(KERN_INFO "Soekris %s: %s\n", model, bios);
> +
> + if (boards[i].init)
> + boards[i].init();
> + break;
> + }
> + }
> +
> +unmap:
> + iounmap(rombase);
> + return 0;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists