[<prev] [next>] [day] [month] [year] [list]
Message-ID: <4544750F.4000301@drzeus.cx>
Date: Sun, 29 Oct 2006 10:31:59 +0100
From: Pierre Ossman <drzeus-list@...eus.cx>
To: Carlos Aguiar <carlos.aguiar@...t.org.br>
CC: linux-kernel@...r.kernel.org,
linux-omap-open-source@...ux.omap.com,
David Brownell <david-b@...bell.net>,
Tony Lindgren <tony@...mide.com>,
Russell King <rmk+lkml@....linux.org.uk>,
ilias.biris@...t.org.br
Subject: Re: [patch 2/6] [RFC] Add MMC Password Protection (lock/unlock) support
V5
Carlos Aguiar wrote:
> +int mmc_key_instantiate(struct key *key, const void *data, size_t datalen)
>
static
> +int mmc_key_match(const struct key *key, const void *description)
>
static
> +void mmc_key_destroy(struct key *key)
>
static
> @@ -335,6 +403,15 @@ static int __init mmc_init(void)
> ret = class_register(&mmc_host_class);
> if (ret)
> bus_unregister(&mmc_bus_type);
> +#ifdef CONFIG_MMC_PASSWORDS
> + else {
> + ret = register_key_type(&mmc_key_type);
> + if (ret) {
> + class_unregister(&mmc_host_class);
> + bus_unregister(&mmc_bus_type);
> + }
> + }
> +#endif
> }
> return ret;
> }
>
We're starting to get a bit of code duplication here. Perhaps an error
handling section at the end of the function would be better.
Rgds
--
-- Pierre Ossman
Linux kernel, MMC maintainer http://www.kernel.org
PulseAudio, core developer http://pulseaudio.org
rdesktop, core developer http://www.rdesktop.org
-
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