drivers/usb/misc/iowarrior.c: NULL dereference

Adrian Bunk <[email protected]>
Newsgroups gmane.linux.usb.devel,gmane.linux.kernel
Message-ID <[email protected]>
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


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.