mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takeshi Yoshimura <yos@sslab.ics.keio.ac.jp>
To: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Vaishali Thakkar <vthakkar1994@gmail.com>,
	linux-pcmcia@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] pcmcia: Add missing free_irq()
Date: Mon, 15 Jun 2015 02:21:44 +0900	[thread overview]
Message-ID: <CAEW7r2YR4JQPXMrrWrfyeOS8PLEyT5DMwYPHfLyfeqW54AQvOw@mail.gmail.com> (raw)
In-Reply-To: <20150614142834.GA3069@light.dominikbrodowski.net>

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

      reply	other threads:[~2015-06-14 17:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-14 12:14 Takeshi Yoshimura
2015-06-14 14:28 ` Dominik Brodowski
2015-06-14 17:21   ` Takeshi Yoshimura [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEW7r2YR4JQPXMrrWrfyeOS8PLEyT5DMwYPHfLyfeqW54AQvOw@mail.gmail.com \
    --to=yos@sslab.ics.keio.ac.jp \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pcmcia@lists.infradead.org \
    --cc=linux@dominikbrodowski.net \
    --cc=vthakkar1994@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®