Commit b0d9142b authored by Himangi Saraogi's avatar Himangi Saraogi Committed by Greg Kroah-Hartman

Staging:cxt1e1:musycc:remove assignment in if condition

This patch removes the assignment in if conditions to do away with the
checkpatch warning :'do not use assignment in if condition'.
Signed-off-by: default avatarHimangi Saraogi <himangi774@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 338d1ad1
...@@ -217,7 +217,8 @@ musycc_dump_ring(ci_t *ci, unsigned int chan) ...@@ -217,7 +217,8 @@ musycc_dump_ring(ci_t *ci, unsigned int chan)
max_intcnt = 0; /* reset counter */ max_intcnt = 0; /* reset counter */
} }
if (!(ch = sd_find_chan(dummy, chan))) { ch = sd_find_chan(dummy, chan);
if (!ch) {
pr_info(">> musycc_dump_ring: channel %d not up.\n", chan); pr_info(">> musycc_dump_ring: channel %d not up.\n", chan);
return ENOENT; return ENOENT;
} }
...@@ -1545,7 +1546,8 @@ musycc_chan_down(ci_t *dummy, int channum) ...@@ -1545,7 +1546,8 @@ musycc_chan_down(ci_t *dummy, int channum)
mch_t *ch; mch_t *ch;
int i, gchan; int i, gchan;
if (!(ch = sd_find_chan(dummy, channum))) ch = sd_find_chan(dummy, channum);
if (!ch)
return EINVAL; return EINVAL;
pi = ch->up; pi = ch->up;
gchan = ch->gchan; gchan = ch->gchan;
...@@ -1596,7 +1598,8 @@ musycc_del_chan(ci_t *ci, int channum) ...@@ -1596,7 +1598,8 @@ musycc_del_chan(ci_t *ci, int channum)
if ((channum < 0) || (channum >= (MUSYCC_NPORTS * MUSYCC_NCHANS))) /* sanity chk param */ if ((channum < 0) || (channum >= (MUSYCC_NPORTS * MUSYCC_NCHANS))) /* sanity chk param */
return ECHRNG; return ECHRNG;
if (!(ch = sd_find_chan(ci, channum))) ch = sd_find_chan(ci, channum);
if (!ch)
return ENOENT; return ENOENT;
if (ch->state == UP) if (ch->state == UP)
musycc_chan_down(ci, channum); musycc_chan_down(ci, channum);
...@@ -1612,7 +1615,8 @@ musycc_del_chan_stats(ci_t *ci, int channum) ...@@ -1612,7 +1615,8 @@ musycc_del_chan_stats(ci_t *ci, int channum)
if (channum < 0 || channum >= (MUSYCC_NPORTS * MUSYCC_NCHANS)) /* sanity chk param */ if (channum < 0 || channum >= (MUSYCC_NPORTS * MUSYCC_NCHANS)) /* sanity chk param */
return ECHRNG; return ECHRNG;
if (!(ch = sd_find_chan(ci, channum))) ch = sd_find_chan(ci, channum);
if (!ch)
return ENOENT; return ENOENT;
memset(&ch->s, 0, sizeof(struct sbecom_chan_stats)); memset(&ch->s, 0, sizeof(struct sbecom_chan_stats));
...@@ -1632,7 +1636,8 @@ musycc_start_xmit(ci_t *ci, int channum, void *mem_token) ...@@ -1632,7 +1636,8 @@ musycc_start_xmit(ci_t *ci, int channum, void *mem_token)
int txd_need_cnt; int txd_need_cnt;
u_int32_t len; u_int32_t len;
if (!(ch = sd_find_chan(ci, channum))) ch = sd_find_chan(ci, channum);
if (!ch)
return -ENOENT; return -ENOENT;
if (ci->state != C_RUNNING) /* full interrupt processing available */ if (ci->state != C_RUNNING) /* full interrupt processing available */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment