The patch titled pktcdvd: add kobject_put when kobject register fails has been added to the -mm tree. Its filename is pktcdvd-add-kobject_put-when-kobject-register-fails.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: pktcdvd: add kobject_put when kobject register fails From: Dave Young <hidave.darkstar@xxxxxxxxx> In kobject_register, the kobject reference is get in kobject_init, and then kobject_add. If kobject_add fail, it will only cleanup the reference got by itself. Signed-off-by: Dave Young <hidave.darkstar@xxxxxxxxx> Reviewed-by: Pekka Enberg <penberg@xxxxxxxxxxxxxx> Cc: Greg KH <greg@xxxxxxxxx> Cc: Peter Osterlund <petero2@xxxxxxxxx> Cc: Jens Axboe <jens.axboe@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/block/pktcdvd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff -puN drivers/block/pktcdvd.c~pktcdvd-add-kobject_put-when-kobject-register-fails drivers/block/pktcdvd.c --- a/drivers/block/pktcdvd.c~pktcdvd-add-kobject_put-when-kobject-register-fails +++ a/drivers/block/pktcdvd.c @@ -117,8 +117,10 @@ static struct pktcdvd_kobj* pkt_kobj_cre p->kobj.parent = parent; p->kobj.ktype = ktype; p->pd = pd; - if (kobject_register(&p->kobj) != 0) + if (kobject_register(&p->kobj) != 0) { + kobject_put(&p->kobj); return NULL; + } return p; } /* _ Patches currently in -mm which might be from hidave.darkstar@xxxxxxxxx are git-cpufreq.patch bluetooth-hidp_process_hid_control-remove-unnecessary-parameter-dealing.patch bluetooth-rfcomm-tty_close-before-destruct.patch pktcdvd-add-kobject_put-when-kobject-register-fails.patch - 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