[...]Hi,
Index: linux-linus-2.6/drivers/mmc/mmc_sysfs.cWhat is zap here for? future use?
===================================================================
--- linux-linus-2.6.orig/drivers/mmc/mmc_sysfs.c 2006-12-04 [...]
+static int mmc_key_instantiate(struct key *key, const void *data, size_t datalen)
+{
+ struct mmc_key_payload *mpayload, *zap;
+ int ret;
+
+ zap = NULL;
+ ret = -EINVAL;Is there a special reason why you already assign the errors to the
+ if (datalen <= 0 || datalen > MMC_KEYLEN_MAXBYTES || !data) {Isn't the last "|| !data" redundant as you already tested if datalen ==0?
+ pr_debug("Invalid data\n");Same as above: Why do you in any case want to assign it here?
+ goto error;
+ }
+
+ ret = key_payload_reserve(key, datalen);
+ if (ret < 0) {
+ pr_debug("ret = %d\n", ret);
+ goto error;
+ }
+
+ ret = -ENOMEM;
+ mpayload = kmalloc(sizeof(*mpayload) + datalen, GFP_KERNEL);I may be totally wrong, but is dereferencing a not initialized pointer