Re: [PATCH -next 1/5] misc: microchip: pci1xxxx: fix error handling in gp_aux_bus_probe()

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

 




On 2022/9/7 19:56, Kumaravel.Thiagarajan@xxxxxxxxxxxxx wrote:
>> -----Original Message-----
>> From: Wei Yongjun <weiyongjun@xxxxxxxxxxxxxxx>
>> Sent: Wednesday, September 7, 2022 2:05 PM
>> To: Kumaravel Thiagarajan - I21417
>> <Kumaravel.Thiagarajan@xxxxxxxxxxxxx>; Arnd Bergmann
>> <arnd@xxxxxxxx>; Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
>> Cc: Wei Yongjun <weiyongjun1@xxxxxxxxxx>; linux-gpio@xxxxxxxxxxxxxxx;
>> kernel-janitors@xxxxxxxxxxxxxxx
>> Subject: [PATCH -next 1/5] misc: microchip: pci1xxxx: fix error handling in
>> gp_aux_bus_probe()
>>
>>
>> From: Wei Yongjun <weiyongjun1@xxxxxxxxxx>
>>
>> In some error handling path, resoures alloced may not released.
>> This patch fix them.
> Thanks for your patch. But I have a minor correction below. Please review.
> Fixes: 393fc2f5948f ("misc: microchip: pci1xxxx: load auxiliary bus driver for the PIO function in the multi-function endpoint of pci1xxxx device.")?

Will add it.

>> Signed-off-by: Wei Yongjun <weiyongjun1@xxxxxxxxxx>
>> ---
>>  drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gp.c | 9 +++++----
>>  1 file changed, 5 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gp.c
>> b/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gp.c
>> index bfc03028b34d..11f79f239006 100644
>> --- a/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gp.c
>> +++ b/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gp.c
>> @@ -87,12 +87,13 @@ static int gp_aux_bus_probe(struct pci_dev *pdev,
>> const struct pci_device_id *id
>>         retval = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_ALL_TYPES);
>>
>>         if (retval < 0)
>> -               return retval;
>> +               goto err_ida_alloc_1;
> By the time the execution reaches here, second ida_alloc (ida_alloc_1) is successful.
> It must go to err_aux_dev_init_1 too.

Yes, you are right. will fix in next version.

Thanks,
Wei Yongjun


>
> Thank You.
>
> Regards,
> Kumaravel




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux