Re: [patch] ALSA: pcxhr: NULL dereference on probe failure

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

 



At Wed, 10 Dec 2014 16:26:21 +0300,
Dan Carpenter wrote:
> 
> "card" is NULL if snd_card_new() fails.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

Applied, thanks.


Takashi

> 
> diff --git a/sound/pci/pcxhr/pcxhr.c b/sound/pci/pcxhr/pcxhr.c
> index a602930..c6092e4 100644
> --- a/sound/pci/pcxhr/pcxhr.c
> +++ b/sound/pci/pcxhr/pcxhr.c
> @@ -1638,7 +1638,7 @@ static int pcxhr_probe(struct pci_dev *pci,
>  				   0, &card);
>  
>  		if (err < 0) {
> -			dev_err(card->dev, "cannot allocate the card %d\n", i);
> +			dev_err(&pci->dev, "cannot allocate the card %d\n", i);
>  			pcxhr_free(mgr);
>  			return err;
>  		}
> 
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux