>> @@ -1153,6 +1150,14 @@ static int snd_via82xx_create(struct snd_card *card,
>>
>> *r_via = chip;
>> return 0;
>> +
>> +disable_device:
>> +pci_disable_device(pci);
>> +goto exit;
>> +free_chip:
>> +snd_via82xx_free(chip);
>> +exit:
>> +return err;
>
> Doubly goto doe
On Tue, 22 Aug 2017 22:16:12 +0200,
Dan Carpenter wrote:
>
> On Tue, Aug 22, 2017 at 10:05:37PM +0200, SF Markus Elfring wrote:
> > >> @@ -1121,30 +1121,27 @@ static int snd_via82xx_create(struct snd_card
> > >> *card,
> > >>
> > >> if ((err = pci_request_regions(pci, card->driver)) <
On Tue, Aug 22, 2017 at 10:05:37PM +0200, SF Markus Elfring wrote:
> >> @@ -1121,30 +1121,27 @@ static int snd_via82xx_create(struct snd_card
> >> *card,
> >>
> >>if ((err = pci_request_regions(pci, card->driver)) < 0) {
> >>kfree(chip);
> >> - pci_disable_device(pci);
>
>> @@ -1121,30 +1121,27 @@ static int snd_via82xx_create(struct snd_card *card,
>>
>> if ((err = pci_request_regions(pci, card->driver)) < 0) {
>> kfree(chip);
>> -pci_disable_device(pci);
>> -return err;
>> +goto disable_device;
>> }
>
On Tue, Aug 22, 2017 at 07:43:08PM +0200, SF Markus Elfring wrote:
> @@ -1121,30 +1121,27 @@ static int snd_via82xx_create(struct snd_card *card,
>
> if ((err = pci_request_regions(pci, card->driver)) < 0) {
> kfree(chip);
> - pci_disable_device(pci);
> -
On Tue, 22 Aug 2017 19:43:08 +0200,
SF Markus Elfring wrote:
>
> From: Markus Elfring
> Date: Tue, 22 Aug 2017 19:37:26 +0200
>
> Add jump targets so that a bit of exception handling can be better reused
> at the end of this function.
>
> This issue was detected by using the Coccinelle software
From: Markus Elfring
Date: Tue, 22 Aug 2017 19:37:26 +0200
Add jump targets so that a bit of exception handling can be better reused
at the end of this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
---
sound/pci/via82xx_modem.c | 33
7 matches
Mail list logo