From: Hans Verkuil <hansverk@cisco.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
mchehab@kernel.org, hans.verkuil@cisco.com, Julia.Lawall@lip6.fr
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] media: v4l2-pci-skeleton: Fix error handling path in 'skeleton_probe()'
Date: Mon, 11 Sep 2017 09:21:25 +0200 [thread overview]
Message-ID: <9b00047e-ce61-bd72-9bf2-c248a87eb013@cisco.com> (raw)
In-Reply-To: <20170910115322.15482-1-christophe.jaillet@wanadoo.fr>
On 09/10/2017 01:53 PM, Christophe JAILLET wrote:
> If this memory allocation fails, we must release some resources, as
> already done in the code below and above.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Please repost and add the linux-media mailinglist to the CC list. That way it ends up
in our patchwork system and it won't be forgotten.
Regards,
Hans
> ---
> samples/v4l/v4l2-pci-skeleton.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/samples/v4l/v4l2-pci-skeleton.c b/samples/v4l/v4l2-pci-skeleton.c
> index 483e9bca9444..f520e3aef9c6 100644
> --- a/samples/v4l/v4l2-pci-skeleton.c
> +++ b/samples/v4l/v4l2-pci-skeleton.c
> @@ -772,8 +772,10 @@ static int skeleton_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>
> /* Allocate a new instance */
> skel = devm_kzalloc(&pdev->dev, sizeof(struct skeleton), GFP_KERNEL);
> - if (!skel)
> - return -ENOMEM;
> + if (!skel) {
> + ret = -ENOMEM;
> + goto disable_pci;
> + }
>
> /* Allocate the interrupt */
> ret = devm_request_irq(&pdev->dev, pdev->irq,
>
prev parent reply other threads:[~2017-09-11 7:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-10 11:53 Christophe JAILLET
2017-09-11 7:21 ` Hans Verkuil [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=9b00047e-ce61-bd72-9bf2-c248a87eb013@cisco.com \
--to=hansverk@cisco.com \
--cc=Julia.Lawall@lip6.fr \
--cc=christophe.jaillet@wanadoo.fr \
--cc=hans.verkuil@cisco.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@kernel.org \
/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®