The patch titled Subject: drivers/w1/w1_int.c: call put_device if device_register fails has been removed from the -mm tree. Its filename was w1-call-put_device-if-device_register-fails.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Levente Kurusa <levex@xxxxxxxxx> Subject: drivers/w1/w1_int.c: call put_device if device_register fails Currently, memsetting and kfreeing the device is bad behaviour. The device will have a reference count of 1 and hence can cause trouble because it has kfree'd. Proper way to handle a failed device_register is to call put_device right after it fails. Signed-off-by: Levente Kurusa <levex@xxxxxxxxx> Acked-by: Evgeniy Polyakov <zbr@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/w1/w1_int.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff -puN drivers/w1/w1_int.c~w1-call-put_device-if-device_register-fails drivers/w1/w1_int.c --- a/drivers/w1/w1_int.c~w1-call-put_device-if-device_register-fails +++ a/drivers/w1/w1_int.c @@ -91,8 +91,7 @@ static struct w1_master *w1_alloc_dev(u3 err = device_register(&dev->dev); if (err) { pr_err("Failed to register master device. err=%d\n", err); - memset(dev, 0, sizeof(struct w1_master)); - kfree(dev); + put_device(&dev->dev); dev = NULL; } _ Patches currently in -mm which might be from levex@xxxxxxxxx are -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html