@redhat.com, "Michael
> > S. Tsirkin" , "Marcel Apfelbaum"
> > Sent: Wednesday, May 24, 2017 8:35:04 AM
> > Subject: Re: [Qemu-devel] [PATCH v5 1/4] net/rocker: Remove the dead error
> > handling
> >
> > Philippe Mathieu-Daudé writes:
>
Sent: Wednesday, May 24, 2017 8:35:04 AM
> Subject: Re: [Qemu-devel] [PATCH v5 1/4] net/rocker: Remove the dead error
> handling
>
> Philippe Mathieu-Daudé writes:
>
> > Hi Markus,
> >
> > On 05/23/2017 06:27 AM, Markus Armbruster wrote:
> > [...]
Philippe Mathieu-Daudé writes:
> Hi Markus,
>
> On 05/23/2017 06:27 AM, Markus Armbruster wrote:
> [...]
>> There's one more cleanup opportunity:
>>
> [...]
>>> if (pci_dma_read(dev, le64_to_cpu(info->desc.buf_addr), info->buf,
>>> size)) {
>>> return NULL;
>>> }
>>
>> None of
Hi Markus,
On 05/23/2017 06:27 AM, Markus Armbruster wrote:
[...]
There's one more cleanup opportunity:
[...]
if (pci_dma_read(dev, le64_to_cpu(info->desc.buf_addr), info->buf, size)) {
return NULL;
}
None of the pci_dma_read() calls outside rocker check the return value.
Mao Zhongyi writes:
> Hi, Markus
>
>
> On 05/23/2017 05:27 PM, Markus Armbruster wrote:
>> Mao Zhongyi writes:
>>
>>> Memory allocation functions like world_alloc, desc_ring_alloc etc,
>>> they are all wrappers around g_malloc, g_new etc. But g_malloc and
>>> similar functions doesn't return nul
Hi, Markus
On 05/23/2017 05:27 PM, Markus Armbruster wrote:
Mao Zhongyi writes:
Memory allocation functions like world_alloc, desc_ring_alloc etc,
they are all wrappers around g_malloc, g_new etc. But g_malloc and
similar functions doesn't return null. Because they ignore the fact
don't
Mao Zhongyi writes:
> Memory allocation functions like world_alloc, desc_ring_alloc etc,
> they are all wrappers around g_malloc, g_new etc. But g_malloc and
> similar functions doesn't return null. Because they ignore the fact
don't
> that g_malloc() of 0 bytes returns null. So error checks
Memory allocation functions like world_alloc, desc_ring_alloc etc,
they are all wrappers around g_malloc, g_new etc. But g_malloc and
similar functions doesn't return null. Because they ignore the fact
that g_malloc() of 0 bytes returns null. So error checks for these
allocation failure are super