ASoC: tegra: unset audio_engine
Bibek Basu [Thu, 8 Jan 2015 10:03:49 +0000 (15:03 +0530)]
If firmware is not found in case of error, set audio_engine
to NULL so that kernel does not panic while further
processing

Bug 200067781

Change-Id: Ia854c978bd33a2615ab27715e83b4d78a1dbab3a
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/670625
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>

sound/soc/tegra/tegra30_avp.c

index e81a813..44d9545 100644 (file)
@@ -2,7 +2,7 @@
  * tegra30_avp.c - Tegra AVP audio driver
  *
  * Author: Sumit Bhattacharya <sumitb@nvidia.com>
- * Copyright (c) 2014, NVIDIA CORPORATION.  All rights reserved.
+ * Copyright (c) 2014-2015, NVIDIA CORPORATION.  All rights reserved.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -364,6 +364,7 @@ static int tegra30_avp_load_ucode(void)
 err_cmd_buf_mem_free:
        tegra30_avp_mem_free(&audio_avp->cmd_buf_mem);
 err_param_mem_free:
+       audio_avp->audio_engine = NULL;
        tegra30_avp_mem_free(&audio_avp->param_mem);
 err_ucode_mem_free:
        tegra30_avp_mem_free(&audio_avp->ucode_mem);