Re: [PATCH] ALSA: asihpi: fix iounmap in error handler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 13 Sep 2020 18:52:30 +0200,
trix@xxxxxxxxxx wrote:
> 
> From: Tom Rix <trix@xxxxxxxxxx>
> 
> clang static analysis flags this problem
> hpioctl.c:513:7: warning: Branch condition evaluates to
>   a garbage value
>                 if (pci.ap_mem_base[idx]) {
>                     ^~~~~~~~~~~~~~~~~~~~
> 
> If there is a failure in the middle of the memory space loop,
> only some of the memory spaces need to be cleaned up.
> 
> At the error handler, idx holds the number of successful
> memory spaces mapped.  So rework the handler loop to use the
> old idx.
> 
> There is a second problem, the memory space loop conditionally
> iomaps()/sets the mem_base so it is necessay to initize pci.
> 
> Fixes: 719f82d3987a ("ALSA: Add support of AudioScience ASI boards")
> Signed-off-by: Tom Rix <trix@xxxxxxxxxx>

Thanks, applied.


Takashi



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux