diff options
Diffstat (limited to 'drivers/media/tuners')
-rw-r--r-- | drivers/media/tuners/it913x.h | 2 | ||||
-rw-r--r-- | drivers/media/tuners/m88rs6000t.c | 6 | ||||
-rw-r--r-- | drivers/media/tuners/mt2063.c | 6 | ||||
-rw-r--r-- | drivers/media/tuners/qt1010.h | 8 | ||||
-rw-r--r-- | drivers/media/tuners/tda827x.h | 10 | ||||
-rw-r--r-- | drivers/media/tuners/tuner-i2c.h | 4 |
6 files changed, 19 insertions, 17 deletions
diff --git a/drivers/media/tuners/it913x.h b/drivers/media/tuners/it913x.h index 600268816d98..bb45637abea9 100644 --- a/drivers/media/tuners/it913x.h +++ b/drivers/media/tuners/it913x.h @@ -14,7 +14,7 @@ /** * struct it913x_platform_data - Platform data for the it913x driver * @regmap: af9033 demod driver regmap. - * @dvb_frontend: af9033 demod driver DVB frontend. + * @fe: af9033 demod driver DVB frontend. * @role: Chip role, single or dual configuration. */ diff --git a/drivers/media/tuners/m88rs6000t.c b/drivers/media/tuners/m88rs6000t.c index b3505f402476..8647c50b66e5 100644 --- a/drivers/media/tuners/m88rs6000t.c +++ b/drivers/media/tuners/m88rs6000t.c @@ -525,7 +525,7 @@ static int m88rs6000t_get_rf_strength(struct dvb_frontend *fe, u16 *strength) PGA2_cri = PGA2_GC >> 2; PGA2_crf = PGA2_GC & 0x03; - for (i = 0; i <= RF_GC; i++) + for (i = 0; i <= RF_GC && i < ARRAY_SIZE(RFGS); i++) RFG += RFGS[i]; if (RF_GC == 0) @@ -537,12 +537,12 @@ static int m88rs6000t_get_rf_strength(struct dvb_frontend *fe, u16 *strength) if (RF_GC == 3) RFG += 100; - for (i = 0; i <= IF_GC; i++) + for (i = 0; i <= IF_GC && i < ARRAY_SIZE(IFGS); i++) IFG += IFGS[i]; TIAG = TIA_GC * TIA_GS; - for (i = 0; i <= BB_GC; i++) + for (i = 0; i <= BB_GC && i < ARRAY_SIZE(BBGS); i++) BBG += BBGS[i]; PGA2G = PGA2_cri * PGA2_cri_GS + PGA2_crf * PGA2_crf_GS; diff --git a/drivers/media/tuners/mt2063.c b/drivers/media/tuners/mt2063.c index d105431a2e2d..6afef11a49cb 100644 --- a/drivers/media/tuners/mt2063.c +++ b/drivers/media/tuners/mt2063.c @@ -1383,7 +1383,7 @@ static u32 MT2063_Round_fLO(u32 f_LO, u32 f_LO_Step, u32 f_ref) } /** - * fLO_FractionalTerm() - Calculates the portion contributed by FracN / denom. + * MT2063_fLO_FractionalTerm - Calculates the portion contributed by FracN / denom. * This function preserves maximum precision without * risk of overflow. It accurately calculates * f_ref * num / denom to within 1 HZ with fixed math. @@ -1411,7 +1411,7 @@ static u32 MT2063_fLO_FractionalTerm(u32 f_ref, u32 num, u32 denom) } /* - * CalcLO1Mult()- Calculates Integer divider value and the numerator + * MT2063_CalcLO1Mult - Calculates Integer divider value and the numerator * value for a FracN PLL. * * This function assumes that the f_LO and f_Ref are @@ -1444,7 +1444,7 @@ static u32 MT2063_CalcLO1Mult(u32 *Div, } /** - * CalcLO2Mult() - Calculates Integer divider value and the numerator + * MT2063_CalcLO2Mult - Calculates Integer divider value and the numerator * value for a FracN PLL. * * This function assumes that the f_LO and f_Ref are diff --git a/drivers/media/tuners/qt1010.h b/drivers/media/tuners/qt1010.h index 559c12b97dbb..8db874334210 100644 --- a/drivers/media/tuners/qt1010.h +++ b/drivers/media/tuners/qt1010.h @@ -16,11 +16,11 @@ struct qt1010_config { }; /** - * Attach a qt1010 tuner to the supplied frontend structure. + * qt1010_attach() - Attach a qt1010 tuner to the supplied frontend structure * - * @param fe frontend to attach to - * @param i2c i2c adapter to use - * @param cfg tuner hw based configuration + * @fe: frontend to attach to + * @i2c: i2c adapter to use + * @cfg: tuner hw based configuration * @return fe pointer on success, NULL on failure */ #if IS_REACHABLE(CONFIG_MEDIA_TUNER_QT1010) diff --git a/drivers/media/tuners/tda827x.h b/drivers/media/tuners/tda827x.h index 30ac9214487f..d3c2f00ada8f 100644 --- a/drivers/media/tuners/tda827x.h +++ b/drivers/media/tuners/tda827x.h @@ -30,12 +30,12 @@ struct tda827x_config /** - * Attach a tda827x tuner to the supplied frontend structure. + * tda827x_attach() - Attach a tda827x tuner to the supplied frontend structure * - * @param fe Frontend to attach to. - * @param addr i2c address of the tuner. - * @param i2c i2c adapter to use. - * @param cfg optional callback function pointers. + * @fe: Frontend to attach to. + * @addr: i2c address of the tuner. + * @i2c: i2c adapter to use. + * @cfg: optional callback function pointers. * @return FE pointer on success, NULL on failure. */ #if IS_REACHABLE(CONFIG_MEDIA_TUNER_TDA827X) diff --git a/drivers/media/tuners/tuner-i2c.h b/drivers/media/tuners/tuner-i2c.h index 724952e001cd..07aeead0644a 100644 --- a/drivers/media/tuners/tuner-i2c.h +++ b/drivers/media/tuners/tuner-i2c.h @@ -133,8 +133,10 @@ static inline int tuner_i2c_xfer_send_recv(struct tuner_i2c_props *props, } \ if (0 == __ret) { \ state = kzalloc(sizeof(type), GFP_KERNEL); \ - if (NULL == state) \ + if (!state) { \ + __ret = -ENOMEM; \ goto __fail; \ + } \ state->i2c_props.addr = i2caddr; \ state->i2c_props.adap = i2cadap; \ state->i2c_props.name = devname; \ |