Browse Source

ASoC: samsung: Add NULL check in i2s.c

'res' could be NULL from one of the operations above (line 1243). Thus
check 'res' for NULL before releasing the region to avoid null pointer
dereference.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
isee-imx_3.14.28.y
Sachin Kamat 7 years ago
committed by Mark Brown
parent
commit
57e33781ce
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      sound/soc/samsung/i2s.c

+ 2
- 1
sound/soc/samsung/i2s.c View File

@ -1268,7 +1268,8 @@ static int samsung_i2s_probe(struct platform_device *pdev)
return 0;
err:
release_mem_region(regs_base, resource_size(res));
if (res)
release_mem_region(regs_base, resource_size(res));
return ret;
}


Loading…
Cancel
Save