diff mbox

ALSA: hda/tegra check correct return value from ioremap_resource

Message ID 1423881144-5957-1-git-send-email-eliot@blennerhassett.gen.nz (mailing list archive)
State Accepted
Commit 93ceaa303b2946453b925c55dc28a4273520dd18
Headers show

Commit Message

Eliot Blennerhassett Feb. 14, 2015, 2:32 a.m. UTC
From: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>

Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
---
 sound/pci/hda/hda_tegra.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Takashi Iwai Feb. 14, 2015, 7:58 a.m. UTC | #1
At Sat, 14 Feb 2015 15:32:24 +1300,
eliot@blennerhassett.gen.nz wrote:
> 
> From: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
> 
> Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>

Applied, thanks.


Takashi

> ---
>  sound/pci/hda/hda_tegra.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c
> index 227990b..375e94f 100644
> --- a/sound/pci/hda/hda_tegra.c
> +++ b/sound/pci/hda/hda_tegra.c
> @@ -329,8 +329,8 @@ static int hda_tegra_init_chip(struct azx *chip, struct platform_device *pdev)
>  
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	hda->regs = devm_ioremap_resource(dev, res);
> -	if (IS_ERR(chip->remap_addr))
> -		return PTR_ERR(chip->remap_addr);
> +	if (IS_ERR(hda->regs))
> +		return PTR_ERR(hda->regs);
>  
>  	chip->remap_addr = hda->regs + HDA_BAR0;
>  	chip->addr = res->start + HDA_BAR0;
> -- 
> 1.9.1
>
diff mbox

Patch

diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c
index 227990b..375e94f 100644
--- a/sound/pci/hda/hda_tegra.c
+++ b/sound/pci/hda/hda_tegra.c
@@ -329,8 +329,8 @@  static int hda_tegra_init_chip(struct azx *chip, struct platform_device *pdev)
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	hda->regs = devm_ioremap_resource(dev, res);
-	if (IS_ERR(chip->remap_addr))
-		return PTR_ERR(chip->remap_addr);
+	if (IS_ERR(hda->regs))
+		return PTR_ERR(hda->regs);
 
 	chip->remap_addr = hda->regs + HDA_BAR0;
 	chip->addr = res->start + HDA_BAR0;