public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* drivers/usb/misc/iowarrior.c: NULL dereference
@ 2007-03-19  9:25 Adrian Bunk
  2007-03-19 10:17 ` [linux-usb-devel] " Oliver Neukum
  2007-03-19 10:39 ` [PATCH]Re: " Oliver Neukum
  0 siblings, 2 replies; 3+ messages in thread
From: Adrian Bunk @ 2007-03-19  9:25 UTC (permalink / raw)
  To: Christian Lucht, Robert Marquardt, Greg Kroah-Hartman
  Cc: linux-usb-devel, linux-kernel

The Coverity checker spotted the following NULL dereference:

<--  snip  -->

...
static ssize_t iowarrior_write(struct file *file,
                               const char __user *user_buffer,
                               size_t count, loff_t *ppos)
{
...
                if (!int_out_urb) {
                        retval = -ENOMEM;
                        dbg("%s Unable to allocate urb ", __func__);
                        goto error;
...
error:
        usb_buffer_free(dev->udev, dev->report_size, buf,
                        int_out_urb->transfer_dma);
...                     ^^^^^^^^^^^^^^^^^^^^^^^^^

<--  snip  -->

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-03-19 10:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-19  9:25 drivers/usb/misc/iowarrior.c: NULL dereference Adrian Bunk
2007-03-19 10:17 ` [linux-usb-devel] " Oliver Neukum
2007-03-19 10:39 ` [PATCH]Re: " Oliver Neukum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox