All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Neukum <oneukum@suse.de>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org, linux-input@vger.kernel.org,
	Jiri Kosina <jkosina@suse.cz>,
	Hans Verkuil <hans.verkuil@cisco.com>
Subject: Re: [RFC PATCH 2/3] radio-keene: add a driver for the Keene FM Transmitter.
Date: Mon, 16 Jan 2012 13:46:46 +0100	[thread overview]
Message-ID: <201201161346.46474.oneukum@suse.de> (raw)
In-Reply-To: <955b875452cd4dca966f87d45a31a718637b03c0.1326716517.git.hans.verkuil@cisco.com>

Am Montag, 16. Januar 2012, 13:29:19 schrieb Hans Verkuil:
> +/* check if the device is present and register with v4l and usb if it is */
> +static int usb_keene_probe(struct usb_interface *intf,
> +                               const struct usb_device_id *id)
> +{
> +       struct keene_device *radio;
> +       struct v4l2_ctrl_handler *hdl;
> +       int retval = 0;
> +
> +       radio = kzalloc(sizeof(struct keene_device), GFP_KERNEL);
> +
> +       if (!radio) {
> +               dev_err(&intf->dev, "kmalloc for keene_device failed\n");
> +               retval = -ENOMEM;
> +               goto err;
> +       }

Oh, I forgot. You have no guarantee the hid driver is already loaded.
This driver needs to also gracefully handle being called for a HID
device.

	Regards
		Oliver

  parent reply	other threads:[~2012-01-16 12:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-16 12:29 [RFC PATCH 0/3] New driver for the Keene USB FM Transmitter Hans Verkuil
2012-01-16 12:29 ` [RFC PATCH 1/3] v4l2-ctrls: fix ugly control name Hans Verkuil
2012-01-16 12:29   ` [RFC PATCH 2/3] radio-keene: add a driver for the Keene FM Transmitter Hans Verkuil
2012-01-16 12:44     ` Oliver Neukum
2012-01-16 13:02       ` Hans Verkuil
2012-01-16 13:11         ` Oliver Neukum
2012-01-16 17:28           ` Alan Cox
2012-01-16 12:46     ` Oliver Neukum [this message]
2012-01-16 13:03       ` Hans Verkuil
2012-01-16 13:15         ` Oliver Neukum
2012-01-16 12:29   ` [RFC PATCH 3/3] hid-core: ignore the Keene FM transmitter Hans Verkuil
2012-01-16 13:00   ` [RFC PATCH 1/3] v4l2-ctrls: fix ugly control name Oliver Neukum
2012-01-16 13:04     ` Hans Verkuil

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=201201161346.46474.oneukum@suse.de \
    --to=oneukum@suse.de \
    --cc=hans.verkuil@cisco.com \
    --cc=hverkuil@xs4all.nl \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-media@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.