The patch titled drivers/gpu/vga/vgaarb.c: add missing kfree has been added to the -mm tree. Its filename is drivers-gpu-vga-vgaarbc-add-missing-kfree.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: drivers/gpu/vga/vgaarb.c: add missing kfree From: Julia Lawall <julia@xxxxxxx> kbuf is a buffer that is local to this function, so all of the error paths leaving the function should release it. Signed-off-by: Julia Lawall <julia@xxxxxxx> Cc: Dave Airlie <airlied@xxxxxxxxxx> Cc: Jesper Juhl <jj@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/gpu/vga/vgaarb.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff -puN drivers/gpu/vga/vgaarb.c~drivers-gpu-vga-vgaarbc-add-missing-kfree drivers/gpu/vga/vgaarb.c --- a/drivers/gpu/vga/vgaarb.c~drivers-gpu-vga-vgaarbc-add-missing-kfree +++ a/drivers/gpu/vga/vgaarb.c @@ -993,14 +993,20 @@ static ssize_t vga_arb_write(struct file uc = &priv->cards[i]; } - if (!uc) - return -EINVAL; + if (!uc) { + ret_val = -EINVAL; + goto done; + } - if (io_state & VGA_RSRC_LEGACY_IO && uc->io_cnt == 0) - return -EINVAL; + if (io_state & VGA_RSRC_LEGACY_IO && uc->io_cnt == 0) { + ret_val = -EINVAL; + goto done; + } - if (io_state & VGA_RSRC_LEGACY_MEM && uc->mem_cnt == 0) - return -EINVAL; + if (io_state & VGA_RSRC_LEGACY_MEM && uc->mem_cnt == 0) { + ret_val = -EINVAL; + goto done; + } vga_put(pdev, io_state); _ Patches currently in -mm which might be from julia@xxxxxxx are origin.patch linux-next.patch drivers-gpu-vga-vgaarbc-add-missing-kfree.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