summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/firmware/cirrus/cs_dsp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/firmware/cirrus/cs_dsp.c b/drivers/firmware/cirrus/cs_dsp.c
index 3814cbba0a54..5af8171d6ced 100644
--- a/drivers/firmware/cirrus/cs_dsp.c
+++ b/drivers/firmware/cirrus/cs_dsp.c
@@ -759,11 +759,11 @@ int cs_dsp_coeff_write_ctrl(struct cs_dsp_coeff_ctl *ctl,
{
int ret = 0;
- lockdep_assert_held(&ctl->dsp->pwr_lock);
-
if (!ctl)
return -ENOENT;
+ lockdep_assert_held(&ctl->dsp->pwr_lock);
+
if (len + off * sizeof(u32) > ctl->len)
return -EINVAL;
@@ -827,11 +827,11 @@ int cs_dsp_coeff_read_ctrl(struct cs_dsp_coeff_ctl *ctl,
{
int ret = 0;
- lockdep_assert_held(&ctl->dsp->pwr_lock);
-
if (!ctl)
return -ENOENT;
+ lockdep_assert_held(&ctl->dsp->pwr_lock);
+
if (len + off * sizeof(u32) > ctl->len)
return -EINVAL;