summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-frontends/stv0900_core.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <m.chehab@samsung.com>2014-09-03 15:11:54 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-09-03 17:59:13 -0300
commit49bc89623d4f7d7c5540083622459122e0ad2312 (patch)
treebe177f629fd93ce86bf870fcf2b5f3a675772492 /drivers/media/dvb-frontends/stv0900_core.c
parentc611c908bb389b700501d028644b9feb8faa20f7 (diff)
downloadop-kernel-dev-49bc89623d4f7d7c5540083622459122e0ad2312.zip
op-kernel-dev-49bc89623d4f7d7c5540083622459122e0ad2312.tar.gz
[media] stv0900_core: don't allocate a temporary var
The error return code STV0900_NO_ERROR happens only once, at the end of the functions. So, just return it directly. This driver should actually be fixed to return standard Linux error codes, instead of its own macros, but this should be done on a separate patchset. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/dvb-frontends/stv0900_core.c')
-rw-r--r--drivers/media/dvb-frontends/stv0900_core.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/media/dvb-frontends/stv0900_core.c b/drivers/media/dvb-frontends/stv0900_core.c
index e5a87b5..2c88abf 100644
--- a/drivers/media/dvb-frontends/stv0900_core.c
+++ b/drivers/media/dvb-frontends/stv0900_core.c
@@ -1270,7 +1270,6 @@ enum fe_stv0900_error stv0900_st_dvbs2_single(struct stv0900_internal *intp,
enum fe_stv0900_demod_mode LDPC_Mode,
enum fe_stv0900_demod_num demod)
{
- enum fe_stv0900_error error = STV0900_NO_ERROR;
s32 reg_ind;
dprintk("%s\n", __func__);
@@ -1337,7 +1336,7 @@ enum fe_stv0900_error stv0900_st_dvbs2_single(struct stv0900_internal *intp,
break;
}
- return error;
+ return STV0900_NO_ERROR;
}
static enum fe_stv0900_error stv0900_init_internal(struct dvb_frontend *fe,
@@ -1555,8 +1554,6 @@ static int stv0900_status(struct stv0900_internal *intp,
static int stv0900_set_mis(struct stv0900_internal *intp,
enum fe_stv0900_demod_num demod, int mis)
{
- enum fe_stv0900_error error = STV0900_NO_ERROR;
-
dprintk("%s\n", __func__);
if (mis < 0 || mis > 255) {
@@ -1569,7 +1566,7 @@ static int stv0900_set_mis(struct stv0900_internal *intp,
stv0900_write_reg(intp, ISIBITENA, 0xff);
}
- return error;
+ return STV0900_NO_ERROR;
}
OpenPOWER on IntegriCloud