Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753045AbbFNRVy (ORCPT ); Sun, 14 Jun 2015 13:21:54 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:35079 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752751AbbFNRVq (ORCPT ); Sun, 14 Jun 2015 13:21:46 -0400 MIME-Version: 1.0 In-Reply-To: <20150614142834.GA3069@light.dominikbrodowski.net> References: <1434284081-7207-1-git-send-email-yos@sslab.ics.keio.ac.jp> <20150614142834.GA3069@light.dominikbrodowski.net> Date: Mon, 15 Jun 2015 02:21:44 +0900 Message-ID: Subject: Re: [PATCH 1/1] pcmcia: Add missing free_irq() From: Takeshi Yoshimura To: Dominik Brodowski Cc: Greg Kroah-Hartman , Vaishali Thakkar , linux-pcmcia@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1584 Lines: 46 Hi, >> index 965bd84..7922e30f 100644 >> --- a/drivers/pcmcia/yenta_socket.c >> +++ b/drivers/pcmcia/yenta_socket.c >> @@ -1269,6 +1269,8 @@ static int yenta_probe(struct pci_dev *dev, const struct pci_device_id *id) >> pcmcia_unregister_socket(&socket->socket); >> } >> >> + if (socket->cb_irq) >> + free_irq(socket->irq, socket); >> unmap: >> iounmap(socket->base); >> release: Oops, I noticed the fixed code was not compilable. Sorry for that. > > However, this should also handle the case for sock->cb_irq being zero, > like it is done in yenta_close. > > Furthermore, when comparing yenta_close and this error path in yenta_probe(), > I noticed a few other issues: > - yenta_free_resources() is not called in yenta_probe() > - pci_set_drvdata(dev, NULL) and kfree(socket) are not called in yenta_probe() > - sock->base is always set to non-NULL when yenta_close() is called, > therefore the check in yenta_close() may be removed. > Thanks for many suggestions. But, it looks like yenta_probe() called kfree() appropriately. I guess you meant to kfree() is not called in yenta_close(). > Would you be willing to update your patch to address also these issues? > Then, I'll happily push it upstream. > Sure. I'll send the updated patch in another mail. Regards, Takeshi Yoshimura -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/