Skip to content

Commit

Permalink
ASoC: msm: qdsp6v2: Fix non-literal-null-conversion warning
Browse files Browse the repository at this point in the history
../sound/soc/msm/qdsp6v2/q6lsm.c:255:33: error: expression which evaluates to zero treated as a null pointer constant of type 'struct lsm_client *' [-Werror,-Wnon-literal-null-conversion]
        lsm_session[client->session] = LSM_INVALID_SESSION_ID;
                                       ^~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: yarost12 <yaro330@gmail.com>
Signed-off-by: Albert I <krascgq@outlook.co.id>
[@nathanchance: Improve changelog text]
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
  • Loading branch information
YaroST12 authored and khusika committed Jun 15, 2018
1 parent d8cd619 commit c6e3076
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sound/soc/msm/qdsp6v2/q6lsm.c
Expand Up @@ -55,7 +55,6 @@ enum {
};

enum {
LSM_INVALID_SESSION_ID = 0,
LSM_MIN_SESSION_ID = 1,
LSM_MAX_SESSION_ID = 8,
LSM_CONTROL_SESSION = 0x0F,
Expand Down Expand Up @@ -254,9 +253,9 @@ static void q6lsm_session_free(struct lsm_client *client)
unsigned long flags;
pr_debug("%s: Freeing session ID %d\n", __func__, client->session);
spin_lock_irqsave(&lsm_session_lock, flags);
lsm_session[client->session] = LSM_INVALID_SESSION_ID;
lsm_session[client->session] = 0;
spin_unlock_irqrestore(&lsm_session_lock, flags);
client->session = LSM_INVALID_SESSION_ID;
client->session = 0;
}

static void *q6lsm_mmap_apr_reg(void)
Expand Down

0 comments on commit c6e3076

Please sign in to comment.