Re: [PATCH] staging: media: lirc: lirc_zilog: Fix for possible null pointer dereference
2015-01-30 14:09 GMT+01:00 valdis.kletni...@vt.edu: On Fri, 30 Jan 2015 16:00:02 +0300, Dan Carpenter said: - if (ir == NULL) { - dev_err(ir-l.dev, close: no private_data attached to the file !\n); Yes, the dev_err() call is an obvious thinko. However, I'm not sure whether removing it entirely is right either. If there *should* be a struct IR * passed there, maybe some other printk() should be issued, or even a WARN_ON(!ir), or something? We set filep-private_data to non-NULL in open() so I don't think it can be NULL here. Then probably the *right* fix is to remove the *entire* if statement, as we can't end up doing the 'return -ENODEV' Hi Ok, but think or know. Who knows? Do the remove if patch? Kind regards Rickard Strandqvist -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] staging: media: lirc: lirc_zilog: Fix for possible null pointer dereference
Fix a possible null pointer dereference, there is otherwise a risk of a possible null pointer dereference. This was found using a static code analysis program called cppcheck Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- drivers/staging/media/lirc/lirc_zilog.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/media/lirc/lirc_zilog.c b/drivers/staging/media/lirc/lirc_zilog.c index cc872fb..78ce3b0 100644 --- a/drivers/staging/media/lirc/lirc_zilog.c +++ b/drivers/staging/media/lirc/lirc_zilog.c @@ -1332,10 +1332,8 @@ static int close(struct inode *node, struct file *filep) /* find our IR struct */ struct IR *ir = filep-private_data; - if (ir == NULL) { - dev_err(ir-l.dev, close: no private_data attached to the file!\n); + if (ir == NULL) return -ENODEV; - } atomic_dec(ir-open_count); -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] staging: media: vino: vino: Removed variables that is never used
Variable ar assigned a value that is never used. I have also removed all the code that thereby serves no purpose. This was found using a static code analysis program called cppcheck Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- drivers/staging/media/vino/vino.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/media/vino/vino.c b/drivers/staging/media/vino/vino.c index 2c85357..f43c1ea 100644 --- a/drivers/staging/media/vino/vino.c +++ b/drivers/staging/media/vino/vino.c @@ -2375,7 +2375,6 @@ static irqreturn_t vino_interrupt(int irq, void *dev_id) next_4_desc = vino-a.next_4_desc; unsigned int line_count_2, page_index_2, - field_counter_2, start_desc_tbl_2, next_4_desc_2; #endif @@ -2421,7 +2420,6 @@ static irqreturn_t vino_interrupt(int irq, void *dev_id) #ifdef VINO_DEBUG_INT line_count_2 = vino-a.line_count; page_index_2 = vino-a.page_index; - field_counter_2 = vino-a.field_counter; start_desc_tbl_2 = vino-a.start_desc_tbl; next_4_desc_2 = vino-a.next_4_desc; -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] media: pci: solo6x10: solo6x10-enc.c: Remove unused function
2015-01-17 14:23 GMT+01:00 Ismael Luceno ismael.luc...@gmail.com: On Fri, 16 Jan 2015 11:55:15 +0100 Hans Verkuil hverk...@xs4all.nl wrote: (resent with correct email address for Ismael) Ismael, Andrey, Can you take a look at this? Shouldn't solo_s_jpeg_qp() be hooked up to something? The feature was never implemented, so yes, and we should keep it around. Hi But maybe add a comment then? Kind regards Rickard Strandqvist -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [media] usb: pvrusb2: pvrusb2-hdw: Remove unused function
Remove the function pvr2_hdw_cmd_powerdown() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- drivers/media/usb/pvrusb2/pvrusb2-hdw.c |5 - drivers/media/usb/pvrusb2/pvrusb2-hdw.h |3 --- 2 files changed, 8 deletions(-) diff --git a/drivers/media/usb/pvrusb2/pvrusb2-hdw.c b/drivers/media/usb/pvrusb2/pvrusb2-hdw.c index 9623b62..972fa23 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-hdw.c @@ -4035,11 +4035,6 @@ int pvr2_hdw_cmd_powerup(struct pvr2_hdw *hdw) } -int pvr2_hdw_cmd_powerdown(struct pvr2_hdw *hdw) -{ - return pvr2_issue_simple_cmd(hdw,FX2CMD_POWER_OFF); -} - int pvr2_hdw_cmd_decoder_reset(struct pvr2_hdw *hdw) { diff --git a/drivers/media/usb/pvrusb2/pvrusb2-hdw.h b/drivers/media/usb/pvrusb2/pvrusb2-hdw.h index 4184707..b108aaf 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-hdw.h +++ b/drivers/media/usb/pvrusb2/pvrusb2-hdw.h @@ -271,9 +271,6 @@ int pvr2_hdw_cmd_deep_reset(struct pvr2_hdw *); /* Execute simple reset command */ int pvr2_hdw_cmd_powerup(struct pvr2_hdw *); -/* suspend */ -int pvr2_hdw_cmd_powerdown(struct pvr2_hdw *); - /* Order decoder to reset */ int pvr2_hdw_cmd_decoder_reset(struct pvr2_hdw *); -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [media] usb: as102: as10x_cmd_cfg: Remove unused function
Remove the function as10x_cmd_eLNA_change_mode() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- drivers/media/usb/as102/as10x_cmd.h |1 - drivers/media/usb/as102/as10x_cmd_cfg.c | 49 --- 2 files changed, 50 deletions(-) diff --git a/drivers/media/usb/as102/as10x_cmd.h b/drivers/media/usb/as102/as10x_cmd.h index e06b84e..d87fc2f 100644 --- a/drivers/media/usb/as102/as10x_cmd.h +++ b/drivers/media/usb/as102/as10x_cmd.h @@ -518,6 +518,5 @@ int as10x_cmd_get_context(struct as10x_bus_adapter_t *adap, uint16_t tag, uint32_t *pvalue); -int as10x_cmd_eLNA_change_mode(struct as10x_bus_adapter_t *adap, uint8_t mode); int as10x_context_rsp_parse(struct as10x_cmd_t *prsp, uint16_t proc_id); #endif diff --git a/drivers/media/usb/as102/as10x_cmd_cfg.c b/drivers/media/usb/as102/as10x_cmd_cfg.c index c87f2ca..74def1f 100644 --- a/drivers/media/usb/as102/as10x_cmd_cfg.c +++ b/drivers/media/usb/as102/as10x_cmd_cfg.c @@ -130,55 +130,6 @@ out: } /** - * as10x_cmd_eLNA_change_mode - send eLNA change mode command to AS10x - * @adap: pointer to AS10x bus adapter - * @mode: mode selected: - * - ON: 0x0 = eLNA always ON - * - OFF : 0x1 = eLNA always OFF - * - AUTO : 0x2 = eLNA follow hysteresis parameters - * to be ON or OFF - * - * Return 0 on success or negative value in case of error. - */ -int as10x_cmd_eLNA_change_mode(struct as10x_bus_adapter_t *adap, uint8_t mode) -{ - int error; - struct as10x_cmd_t *pcmd, *prsp; - - pcmd = adap-cmd; - prsp = adap-rsp; - - /* prepare command */ - as10x_cmd_build(pcmd, (++adap-cmd_xid), - sizeof(pcmd-body.cfg_change_mode.req)); - - /* fill command */ - pcmd-body.cfg_change_mode.req.proc_id = - cpu_to_le16(CONTROL_PROC_ELNA_CHANGE_MODE); - pcmd-body.cfg_change_mode.req.mode = mode; - - /* send command */ - if (adap-ops-xfer_cmd) { - error = adap-ops-xfer_cmd(adap, (uint8_t *) pcmd, - sizeof(pcmd-body.cfg_change_mode.req) - + HEADER_SIZE, (uint8_t *) prsp, - sizeof(prsp-body.cfg_change_mode.rsp) - + HEADER_SIZE); - } else { - error = AS10X_CMD_ERROR; - } - - if (error 0) - goto out; - - /* parse response */ - error = as10x_rsp_parse(prsp, CONTROL_PROC_ELNA_CHANGE_MODE_RSP); - -out: - return error; -} - -/** * as10x_context_rsp_parse - Parse context command response * @prsp: pointer to AS10x command response buffer * @proc_id:id of the command -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] media: s5p-jpeg: Remove some unused functions
Removes some functions that are not used anywhere: s5p_jpeg_input_raw_y16() s5p_jpeg_timer_disable() s5p_jpeg_timer_enable() This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- drivers/media/platform/s5p-jpeg/jpeg-hw-s5p.c | 32 - drivers/media/platform/s5p-jpeg/jpeg-hw-s5p.h |3 --- 2 files changed, 35 deletions(-) diff --git a/drivers/media/platform/s5p-jpeg/jpeg-hw-s5p.c b/drivers/media/platform/s5p-jpeg/jpeg-hw-s5p.c index e3b8e67..b5f20e7 100644 --- a/drivers/media/platform/s5p-jpeg/jpeg-hw-s5p.c +++ b/drivers/media/platform/s5p-jpeg/jpeg-hw-s5p.c @@ -51,18 +51,6 @@ void s5p_jpeg_input_raw_mode(void __iomem *regs, unsigned long mode) writel(reg, regs + S5P_JPGCMOD); } -void s5p_jpeg_input_raw_y16(void __iomem *regs, bool y16) -{ - unsigned long reg; - - reg = readl(regs + S5P_JPGCMOD); - if (y16) - reg |= S5P_MODE_Y16; - else - reg = ~S5P_MODE_Y16_MASK; - writel(reg, regs + S5P_JPGCMOD); -} - void s5p_jpeg_proc_mode(void __iomem *regs, unsigned long mode) { unsigned long reg, m; @@ -208,26 +196,6 @@ void s5p_jpeg_final_mcu_num_int_enable(void __iomem *regs, bool enbl) writel(reg, regs + S5P_JPGINTSE); } -void s5p_jpeg_timer_enable(void __iomem *regs, unsigned long val) -{ - unsigned long reg; - - reg = readl(regs + S5P_JPG_TIMER_SE); - reg |= S5P_TIMER_INT_EN; - reg = ~S5P_TIMER_INIT_MASK; - reg |= val S5P_TIMER_INIT_MASK; - writel(reg, regs + S5P_JPG_TIMER_SE); -} - -void s5p_jpeg_timer_disable(void __iomem *regs) -{ - unsigned long reg; - - reg = readl(regs + S5P_JPG_TIMER_SE); - reg = ~S5P_TIMER_INT_EN_MASK; - writel(reg, regs + S5P_JPG_TIMER_SE); -} - int s5p_jpeg_timer_stat(void __iomem *regs) { return (int)((readl(regs + S5P_JPG_TIMER_ST) S5P_TIMER_INT_STAT_MASK) diff --git a/drivers/media/platform/s5p-jpeg/jpeg-hw-s5p.h b/drivers/media/platform/s5p-jpeg/jpeg-hw-s5p.h index c11ebe8..f208fa3 100644 --- a/drivers/media/platform/s5p-jpeg/jpeg-hw-s5p.h +++ b/drivers/media/platform/s5p-jpeg/jpeg-hw-s5p.h @@ -29,7 +29,6 @@ void s5p_jpeg_reset(void __iomem *regs); void s5p_jpeg_poweron(void __iomem *regs); void s5p_jpeg_input_raw_mode(void __iomem *regs, unsigned long mode); -void s5p_jpeg_input_raw_y16(void __iomem *regs, bool y16); void s5p_jpeg_proc_mode(void __iomem *regs, unsigned long mode); void s5p_jpeg_subsampling_mode(void __iomem *regs, unsigned int mode); unsigned int s5p_jpeg_get_subsampling_mode(void __iomem *regs); @@ -42,8 +41,6 @@ void s5p_jpeg_x(void __iomem *regs, unsigned int x); void s5p_jpeg_rst_int_enable(void __iomem *regs, bool enable); void s5p_jpeg_data_num_int_enable(void __iomem *regs, bool enable); void s5p_jpeg_final_mcu_num_int_enable(void __iomem *regs, bool enbl); -void s5p_jpeg_timer_enable(void __iomem *regs, unsigned long val); -void s5p_jpeg_timer_disable(void __iomem *regs); int s5p_jpeg_timer_stat(void __iomem *regs); void s5p_jpeg_clear_timer_stat(void __iomem *regs); void s5p_jpeg_enc_stream_int(void __iomem *regs, unsigned long size); -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] media: platform: s5p-jpeg: jpeg-hw-exynos4: Remove some unused functions
Removes some functions that are not used anywhere: exynos4_jpeg_set_timer_count() exynos4_jpeg_get_frame_size() exynos4_jpeg_set_sys_int_enable() exynos4_jpeg_get_fifo_status() This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c | 35 - drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.h |5 --- 2 files changed, 40 deletions(-) diff --git a/drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c b/drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c index ab6d6f4..5685577 100644 --- a/drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c +++ b/drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c @@ -163,15 +163,6 @@ unsigned int exynos4_jpeg_get_int_status(void __iomem *base) return int_status; } -unsigned int exynos4_jpeg_get_fifo_status(void __iomem *base) -{ - unsigned int fifo_status; - - fifo_status = readl(base + EXYNOS4_FIFO_STATUS_REG); - - return fifo_status; -} - void exynos4_jpeg_set_huf_table_enable(void __iomem *base, int value) { unsigned intreg; @@ -186,18 +177,6 @@ void exynos4_jpeg_set_huf_table_enable(void __iomem *base, int value) base + EXYNOS4_JPEG_CNTL_REG); } -void exynos4_jpeg_set_sys_int_enable(void __iomem *base, int value) -{ - unsigned intreg; - - reg = readl(base + EXYNOS4_JPEG_CNTL_REG) ~(EXYNOS4_SYS_INT_EN); - - if (value == 1) - writel(reg | EXYNOS4_SYS_INT_EN, base + EXYNOS4_JPEG_CNTL_REG); - else - writel(reg ~EXYNOS4_SYS_INT_EN, base + EXYNOS4_JPEG_CNTL_REG); -} - void exynos4_jpeg_set_stream_buf_address(void __iomem *base, unsigned int address) { @@ -255,22 +234,8 @@ void exynos4_jpeg_set_dec_bitstream_size(void __iomem *base, unsigned int size) writel(size, base + EXYNOS4_BITSTREAM_SIZE_REG); } -void exynos4_jpeg_get_frame_size(void __iomem *base, - unsigned int *width, unsigned int *height) -{ - *width = (readl(base + EXYNOS4_DECODE_XY_SIZE_REG) - EXYNOS4_DECODED_SIZE_MASK); - *height = (readl(base + EXYNOS4_DECODE_XY_SIZE_REG) 16) - EXYNOS4_DECODED_SIZE_MASK; -} - unsigned int exynos4_jpeg_get_frame_fmt(void __iomem *base) { return readl(base + EXYNOS4_DECODE_IMG_FMT_REG) EXYNOS4_JPEG_DECODED_IMG_FMT_MASK; } - -void exynos4_jpeg_set_timer_count(void __iomem *base, unsigned int size) -{ - writel(size, base + EXYNOS4_INT_TIMER_COUNT_REG); -} diff --git a/drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.h b/drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.h index c228d28..19690e4 100644 --- a/drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.h +++ b/drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.h @@ -21,7 +21,6 @@ void exynos4_jpeg_set_enc_tbl(void __iomem *base); void exynos4_jpeg_set_interrupt(void __iomem *base); unsigned int exynos4_jpeg_get_int_status(void __iomem *base); void exynos4_jpeg_set_huf_table_enable(void __iomem *base, int value); -void exynos4_jpeg_set_sys_int_enable(void __iomem *base, int value); void exynos4_jpeg_set_stream_buf_address(void __iomem *base, unsigned int address); void exynos4_jpeg_set_stream_size(void __iomem *base, @@ -33,10 +32,6 @@ void exynos4_jpeg_set_encode_tbl_select(void __iomem *base, void exynos4_jpeg_set_encode_hoff_cnt(void __iomem *base, unsigned int fmt); void exynos4_jpeg_set_dec_bitstream_size(void __iomem *base, unsigned int size); unsigned int exynos4_jpeg_get_stream_size(void __iomem *base); -void exynos4_jpeg_get_frame_size(void __iomem *base, - unsigned int *width, unsigned int *height); unsigned int exynos4_jpeg_get_frame_fmt(void __iomem *base); -unsigned int exynos4_jpeg_get_fifo_status(void __iomem *base); -void exynos4_jpeg_set_timer_count(void __iomem *base, unsigned int size); #endif /* JPEG_HW_EXYNOS4_H_ */ -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] media: i2c: adv7604: Remove some unused functions
Removes some functions that are not used anywhere: test_read() edid_read_block() dpp_write() dpp_read() esdp_write() esdp_read() cec_write_clr_set() This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- drivers/media/i2c/adv7604.c | 66 --- 1 file changed, 66 deletions(-) diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c index 47795ff..5e07b91 100644 --- a/drivers/media/i2c/adv7604.c +++ b/drivers/media/i2c/adv7604.c @@ -466,11 +466,6 @@ static inline int cec_write(struct v4l2_subdev *sd, u8 reg, u8 val) return adv_smbus_write_byte_data(state, ADV7604_PAGE_CEC, reg, val); } -static inline int cec_write_clr_set(struct v4l2_subdev *sd, u8 reg, u8 mask, u8 val) -{ - return cec_write(sd, reg, (cec_read(sd, reg) ~mask) | val); -} - static inline int infoframe_read(struct v4l2_subdev *sd, u8 reg) { struct adv7604_state *state = to_state(sd); @@ -486,34 +481,6 @@ static inline int infoframe_write(struct v4l2_subdev *sd, u8 reg, u8 val) reg, val); } -static inline int esdp_read(struct v4l2_subdev *sd, u8 reg) -{ - struct adv7604_state *state = to_state(sd); - - return adv_smbus_read_byte_data(state, ADV7604_PAGE_ESDP, reg); -} - -static inline int esdp_write(struct v4l2_subdev *sd, u8 reg, u8 val) -{ - struct adv7604_state *state = to_state(sd); - - return adv_smbus_write_byte_data(state, ADV7604_PAGE_ESDP, reg, val); -} - -static inline int dpp_read(struct v4l2_subdev *sd, u8 reg) -{ - struct adv7604_state *state = to_state(sd); - - return adv_smbus_read_byte_data(state, ADV7604_PAGE_DPP, reg); -} - -static inline int dpp_write(struct v4l2_subdev *sd, u8 reg, u8 val) -{ - struct adv7604_state *state = to_state(sd); - - return adv_smbus_write_byte_data(state, ADV7604_PAGE_DPP, reg, val); -} - static inline int afe_read(struct v4l2_subdev *sd, u8 reg) { struct adv7604_state *state = to_state(sd); @@ -561,32 +528,6 @@ static inline int edid_write(struct v4l2_subdev *sd, u8 reg, u8 val) return adv_smbus_write_byte_data(state, ADV7604_PAGE_EDID, reg, val); } -static inline int edid_read_block(struct v4l2_subdev *sd, unsigned len, u8 *val) -{ - struct adv7604_state *state = to_state(sd); - struct i2c_client *client = state-i2c_clients[ADV7604_PAGE_EDID]; - u8 msgbuf0[1] = { 0 }; - u8 msgbuf1[256]; - struct i2c_msg msg[2] = { - { - .addr = client-addr, - .len = 1, - .buf = msgbuf0 - }, - { - .addr = client-addr, - .flags = I2C_M_RD, - .len = len, - .buf = msgbuf1 - }, - }; - - if (i2c_transfer(client-adapter, msg, 2) 0) - return -EIO; - memcpy(val, msgbuf1, len); - return 0; -} - static inline int edid_write_block(struct v4l2_subdev *sd, unsigned len, const u8 *val) { @@ -652,13 +593,6 @@ static inline int hdmi_write_clr_set(struct v4l2_subdev *sd, u8 reg, u8 mask, u8 return hdmi_write(sd, reg, (hdmi_read(sd, reg) ~mask) | val); } -static inline int test_read(struct v4l2_subdev *sd, u8 reg) -{ - struct adv7604_state *state = to_state(sd); - - return adv_smbus_read_byte_data(state, ADV7604_PAGE_TEST, reg); -} - static inline int test_write(struct v4l2_subdev *sd, u8 reg, u8 val) { struct adv7604_state *state = to_state(sd); -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] media: i2c: adv7604.c: Remove some unused functions
Removes some functions that are not used anywhere: vblanking() hblanking() This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- drivers/media/i2c/adv7604.c | 10 -- drivers/media/i2c/adv7842.c | 10 -- drivers/media/i2c/ths8200.c | 10 -- 3 files changed, 30 deletions(-) diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c index 47795ff..0ecca94 100644 --- a/drivers/media/i2c/adv7604.c +++ b/drivers/media/i2c/adv7604.c @@ -333,21 +333,11 @@ static inline struct adv7604_state *to_state(struct v4l2_subdev *sd) return container_of(sd, struct adv7604_state, sd); } -static inline unsigned hblanking(const struct v4l2_bt_timings *t) -{ - return V4L2_DV_BT_BLANKING_WIDTH(t); -} - static inline unsigned htotal(const struct v4l2_bt_timings *t) { return V4L2_DV_BT_FRAME_WIDTH(t); } -static inline unsigned vblanking(const struct v4l2_bt_timings *t) -{ - return V4L2_DV_BT_BLANKING_HEIGHT(t); -} - static inline unsigned vtotal(const struct v4l2_bt_timings *t) { return V4L2_DV_BT_FRAME_HEIGHT(t); diff --git a/drivers/media/i2c/adv7842.c b/drivers/media/i2c/adv7842.c index 48b628b..d89898c 100644 --- a/drivers/media/i2c/adv7842.c +++ b/drivers/media/i2c/adv7842.c @@ -220,21 +220,11 @@ static inline struct v4l2_subdev *to_sd(struct v4l2_ctrl *ctrl) return container_of(ctrl-handler, struct adv7842_state, hdl)-sd; } -static inline unsigned hblanking(const struct v4l2_bt_timings *t) -{ - return V4L2_DV_BT_BLANKING_WIDTH(t); -} - static inline unsigned htotal(const struct v4l2_bt_timings *t) { return V4L2_DV_BT_FRAME_WIDTH(t); } -static inline unsigned vblanking(const struct v4l2_bt_timings *t) -{ - return V4L2_DV_BT_BLANKING_HEIGHT(t); -} - static inline unsigned vtotal(const struct v4l2_bt_timings *t) { return V4L2_DV_BT_FRAME_HEIGHT(t); diff --git a/drivers/media/i2c/ths8200.c b/drivers/media/i2c/ths8200.c index 656d889..4ebd329 100644 --- a/drivers/media/i2c/ths8200.c +++ b/drivers/media/i2c/ths8200.c @@ -58,21 +58,11 @@ static inline struct ths8200_state *to_state(struct v4l2_subdev *sd) return container_of(sd, struct ths8200_state, sd); } -static inline unsigned hblanking(const struct v4l2_bt_timings *t) -{ - return V4L2_DV_BT_BLANKING_WIDTH(t); -} - static inline unsigned htotal(const struct v4l2_bt_timings *t) { return V4L2_DV_BT_FRAME_WIDTH(t); } -static inline unsigned vblanking(const struct v4l2_bt_timings *t) -{ - return V4L2_DV_BT_BLANKING_HEIGHT(t); -} - static inline unsigned vtotal(const struct v4l2_bt_timings *t) { return V4L2_DV_BT_FRAME_HEIGHT(t); -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] media: pci: mantis: mantis_core.c: Remove unused function
Remove the function write_eeprom_byte() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- drivers/media/pci/mantis/mantis_core.c | 23 --- 1 file changed, 23 deletions(-) diff --git a/drivers/media/pci/mantis/mantis_core.c b/drivers/media/pci/mantis/mantis_core.c index 684d906..82220ea 100644 --- a/drivers/media/pci/mantis/mantis_core.c +++ b/drivers/media/pci/mantis/mantis_core.c @@ -56,29 +56,6 @@ static int read_eeprom_byte(struct mantis_pci *mantis, u8 *data, u8 length) return 0; } -static int write_eeprom_byte(struct mantis_pci *mantis, u8 *data, u8 length) -{ - int err; - - struct i2c_msg msg = { - .addr = 0x50, - .flags = 0, - .buf = data, - .len = length - }; - - err = i2c_transfer(mantis-adapter, msg, 1); - if (err 0) { - dprintk(verbose, MANTIS_ERROR, 1, - ERROR: i2c write: err=%i length=0x%02x d0=0x%02x, d1=0x%02x , - err, length, data[0], data[1]); - - return err; - } - - return 0; -} - static int get_mac_address(struct mantis_pci *mantis) { int err; -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] media: platform: vsp1: vsp1_hsit: Remove unused function
Remove the function vsp1_hsit_read() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- drivers/media/platform/vsp1/vsp1_hsit.c |5 - 1 file changed, 5 deletions(-) diff --git a/drivers/media/platform/vsp1/vsp1_hsit.c b/drivers/media/platform/vsp1/vsp1_hsit.c index db2950a..9fb003b 100644 --- a/drivers/media/platform/vsp1/vsp1_hsit.c +++ b/drivers/media/platform/vsp1/vsp1_hsit.c @@ -26,11 +26,6 @@ * Device Access */ -static inline u32 vsp1_hsit_read(struct vsp1_hsit *hsit, u32 reg) -{ - return vsp1_read(hsit-entity.vsp1, reg); -} - static inline void vsp1_hsit_write(struct vsp1_hsit *hsit, u32 reg, u32 data) { vsp1_write(hsit-entity.vsp1, reg, data); -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] media: pci: saa7134: saa7134-video.c: Remove unused function
Remove the function saa7134_queue() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- drivers/media/pci/saa7134/saa7134-video.c |5 - 1 file changed, 5 deletions(-) diff --git a/drivers/media/pci/saa7134/saa7134-video.c b/drivers/media/pci/saa7134/saa7134-video.c index fc4a427..cf40573 100644 --- a/drivers/media/pci/saa7134/saa7134-video.c +++ b/drivers/media/pci/saa7134/saa7134-video.c @@ -1098,11 +1098,6 @@ static int saa7134_s_ctrl(struct v4l2_ctrl *ctrl) /* -- */ -static inline struct vb2_queue *saa7134_queue(struct file *file) -{ - return video_devdata(file)-queue; -} - static int video_open(struct file *file) { struct video_device *vdev = video_devdata(file); -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] media: radio: wl128x: fmdrv_rx.c: Remove unused function
Remove the function fm_rx_get_rds_system() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- drivers/media/radio/wl128x/fmdrv_rx.c | 16 drivers/media/radio/wl128x/fmdrv_rx.h |1 - 2 files changed, 17 deletions(-) diff --git a/drivers/media/radio/wl128x/fmdrv_rx.c b/drivers/media/radio/wl128x/fmdrv_rx.c index 09632cb..cfaeb24 100644 --- a/drivers/media/radio/wl128x/fmdrv_rx.c +++ b/drivers/media/radio/wl128x/fmdrv_rx.c @@ -785,22 +785,6 @@ int fm_rx_set_rds_system(struct fmdev *fmdev, u8 rds_mode) return 0; } -/* Returns current RDS operation mode */ -int fm_rx_get_rds_system(struct fmdev *fmdev, u8 *rds_mode) -{ - if (fmdev-curr_fmmode != FM_MODE_RX) - return -EPERM; - - if (rds_mode == NULL) { - fmerr(Invalid memory\n); - return -ENOMEM; - } - - *rds_mode = fmdev-rx.rds_mode; - - return 0; -} - /* Configures Alternate Frequency switch mode */ int fm_rx_set_af_switch(struct fmdev *fmdev, u8 af_mode) { diff --git a/drivers/media/radio/wl128x/fmdrv_rx.h b/drivers/media/radio/wl128x/fmdrv_rx.h index 32add81..2392218 100644 --- a/drivers/media/radio/wl128x/fmdrv_rx.h +++ b/drivers/media/radio/wl128x/fmdrv_rx.h @@ -40,7 +40,6 @@ void fm_rx_reset_station_info(struct fmdev *); int fm_rx_seek(struct fmdev *, u32, u32, u32); int fm_rx_get_rds_mode(struct fmdev *, u8 *); -int fm_rx_get_rds_system(struct fmdev *, u8 *); int fm_rx_get_mute_mode(struct fmdev *, u8 *); int fm_rx_get_volume(struct fmdev *, u16 *); int fm_rx_get_band_freq_range(struct fmdev *, -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] media: pci: solo6x10: solo6x10-enc.c: Remove unused function
Remove the function solo_s_jpeg_qp() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- drivers/media/pci/solo6x10/solo6x10-enc.c | 35 - drivers/media/pci/solo6x10/solo6x10.h |2 -- 2 files changed, 37 deletions(-) diff --git a/drivers/media/pci/solo6x10/solo6x10-enc.c b/drivers/media/pci/solo6x10/solo6x10-enc.c index d19c0ae..6b589b8 100644 --- a/drivers/media/pci/solo6x10/solo6x10-enc.c +++ b/drivers/media/pci/solo6x10/solo6x10-enc.c @@ -175,41 +175,6 @@ out: return 0; } -/** - * Set channel Quality Profile (0-3). - */ -void solo_s_jpeg_qp(struct solo_dev *solo_dev, unsigned int ch, - unsigned int qp) -{ - unsigned long flags; - unsigned int idx, reg; - - if ((ch 31) || (qp 3)) - return; - - if (solo_dev-type == SOLO_DEV_6010) - return; - - if (ch 16) { - idx = 0; - reg = SOLO_VE_JPEG_QP_CH_L; - } else { - ch -= 16; - idx = 1; - reg = SOLO_VE_JPEG_QP_CH_H; - } - ch *= 2; - - spin_lock_irqsave(solo_dev-jpeg_qp_lock, flags); - - solo_dev-jpeg_qp[idx] = ~(3 ch); - solo_dev-jpeg_qp[idx] |= (qp 3) ch; - - solo_reg_write(solo_dev, reg, solo_dev-jpeg_qp[idx]); - - spin_unlock_irqrestore(solo_dev-jpeg_qp_lock, flags); -} - int solo_g_jpeg_qp(struct solo_dev *solo_dev, unsigned int ch) { int idx; diff --git a/drivers/media/pci/solo6x10/solo6x10.h b/drivers/media/pci/solo6x10/solo6x10.h index 72017b7..ad5afc6 100644 --- a/drivers/media/pci/solo6x10/solo6x10.h +++ b/drivers/media/pci/solo6x10/solo6x10.h @@ -399,8 +399,6 @@ int solo_eeprom_write(struct solo_dev *solo_dev, int loc, __be16 data); /* JPEG Qp functions */ -void solo_s_jpeg_qp(struct solo_dev *solo_dev, unsigned int ch, - unsigned int qp); int solo_g_jpeg_qp(struct solo_dev *solo_dev, unsigned int ch); #define CHK_FLAGS(v, flags) (((v) (flags)) == (flags)) -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] media: pci: cx18: cx18-alsa-mixer.c: Remove some unused functions
Removes some functions that are not used anywhere: snd_cx18_mixer_tv_vol_get() snd_cx18_mixer_tv_vol_info() snd_cx18_mixer_tv_vol_put() This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- drivers/media/pci/cx18/cx18-alsa-mixer.c | 62 -- 1 file changed, 62 deletions(-) diff --git a/drivers/media/pci/cx18/cx18-alsa-mixer.c b/drivers/media/pci/cx18/cx18-alsa-mixer.c index 341bddc..e7b0a1f 100644 --- a/drivers/media/pci/cx18/cx18-alsa-mixer.c +++ b/drivers/media/pci/cx18/cx18-alsa-mixer.c @@ -69,68 +69,6 @@ static inline int cx18_av_vol_to_dB(int v) return (v 9) - 119; } -static int snd_cx18_mixer_tv_vol_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - uinfo-type = SNDRV_CTL_ELEM_TYPE_INTEGER; - uinfo-count = 1; - /* We're already translating values, just keep this control in dB */ - uinfo-value.integer.min = -96; - uinfo-value.integer.max = 8; - uinfo-value.integer.step = 1; - return 0; -} - -static int snd_cx18_mixer_tv_vol_get(struct snd_kcontrol *kctl, -struct snd_ctl_elem_value *uctl) -{ - struct snd_cx18_card *cxsc = snd_kcontrol_chip(kctl); - struct cx18 *cx = to_cx18(cxsc-v4l2_dev); - struct v4l2_control vctrl; - int ret; - - vctrl.id = V4L2_CID_AUDIO_VOLUME; - vctrl.value = dB_to_cx18_av_vol(uctl-value.integer.value[0]); - - snd_cx18_lock(cxsc); - ret = v4l2_subdev_call(cx-sd_av, core, g_ctrl, vctrl); - snd_cx18_unlock(cxsc); - - if (!ret) - uctl-value.integer.value[0] = cx18_av_vol_to_dB(vctrl.value); - return ret; -} - -static int snd_cx18_mixer_tv_vol_put(struct snd_kcontrol *kctl, -struct snd_ctl_elem_value *uctl) -{ - struct snd_cx18_card *cxsc = snd_kcontrol_chip(kctl); - struct cx18 *cx = to_cx18(cxsc-v4l2_dev); - struct v4l2_control vctrl; - int ret; - - vctrl.id = V4L2_CID_AUDIO_VOLUME; - vctrl.value = dB_to_cx18_av_vol(uctl-value.integer.value[0]); - - snd_cx18_lock(cxsc); - - /* Fetch current state */ - ret = v4l2_subdev_call(cx-sd_av, core, g_ctrl, vctrl); - - if (ret || - (cx18_av_vol_to_dB(vctrl.value) != uctl-value.integer.value[0])) { - - /* Set, if needed */ - vctrl.value = dB_to_cx18_av_vol(uctl-value.integer.value[0]); - ret = v4l2_subdev_call(cx-sd_av, core, s_ctrl, vctrl); - if (!ret) - ret = 1; /* Indicate control was changed w/o error */ - } - snd_cx18_unlock(cxsc); - - return ret; -} - /* This is a bit of overkill, the slider is already in dB internally */ static DECLARE_TLV_DB_SCALE(snd_cx18_mixer_tv_vol_db_scale, -9600, 100, 0); -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] media: pci: cx18: cx18-alsa-mixer.c: Remove some unused functions
2014-12-21 1:06 GMT+01:00 Andy Walls awa...@md.metrocast.net: On December 20, 2014 5:35:17 PM EST, Rickard Strandqvist rickard_strandqv...@spectrumdigital.se wrote: Removes some functions that are not used anywhere: snd_cx18_mixer_tv_vol_get() snd_cx18_mixer_tv_vol_info() snd_cx18_mixer_tv_vol_put() This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- drivers/media/pci/cx18/cx18-alsa-mixer.c | 62 -- 1 file changed, 62 deletions(-) diff --git a/drivers/media/pci/cx18/cx18-alsa-mixer.c b/drivers/media/pci/cx18/cx18-alsa-mixer.c index 341bddc..e7b0a1f 100644 --- a/drivers/media/pci/cx18/cx18-alsa-mixer.c +++ b/drivers/media/pci/cx18/cx18-alsa-mixer.c @@ -69,68 +69,6 @@ static inline int cx18_av_vol_to_dB(int v) return (v 9) - 119; } -static int snd_cx18_mixer_tv_vol_info(struct snd_kcontrol *kcontrol, -struct snd_ctl_elem_info *uinfo) -{ - uinfo-type = SNDRV_CTL_ELEM_TYPE_INTEGER; - uinfo-count = 1; - /* We're already translating values, just keep this control in dB */ - uinfo-value.integer.min = -96; - uinfo-value.integer.max = 8; - uinfo-value.integer.step = 1; - return 0; -} - -static int snd_cx18_mixer_tv_vol_get(struct snd_kcontrol *kctl, - struct snd_ctl_elem_value *uctl) -{ - struct snd_cx18_card *cxsc = snd_kcontrol_chip(kctl); - struct cx18 *cx = to_cx18(cxsc-v4l2_dev); - struct v4l2_control vctrl; - int ret; - - vctrl.id = V4L2_CID_AUDIO_VOLUME; - vctrl.value = dB_to_cx18_av_vol(uctl-value.integer.value[0]); - - snd_cx18_lock(cxsc); - ret = v4l2_subdev_call(cx-sd_av, core, g_ctrl, vctrl); - snd_cx18_unlock(cxsc); - - if (!ret) - uctl-value.integer.value[0] = cx18_av_vol_to_dB(vctrl.value); - return ret; -} - -static int snd_cx18_mixer_tv_vol_put(struct snd_kcontrol *kctl, - struct snd_ctl_elem_value *uctl) -{ - struct snd_cx18_card *cxsc = snd_kcontrol_chip(kctl); - struct cx18 *cx = to_cx18(cxsc-v4l2_dev); - struct v4l2_control vctrl; - int ret; - - vctrl.id = V4L2_CID_AUDIO_VOLUME; - vctrl.value = dB_to_cx18_av_vol(uctl-value.integer.value[0]); - - snd_cx18_lock(cxsc); - - /* Fetch current state */ - ret = v4l2_subdev_call(cx-sd_av, core, g_ctrl, vctrl); - - if (ret || - (cx18_av_vol_to_dB(vctrl.value) != uctl-value.integer.value[0])) { - - /* Set, if needed */ - vctrl.value = dB_to_cx18_av_vol(uctl-value.integer.value[0]); - ret = v4l2_subdev_call(cx-sd_av, core, s_ctrl, vctrl); - if (!ret) - ret = 1; /* Indicate control was changed w/o error */ - } - snd_cx18_unlock(cxsc); - - return ret; -} - /* This is a bit of overkill, the slider is already in dB internally */ static DECLARE_TLV_DB_SCALE(snd_cx18_mixer_tv_vol_db_scale, -9600, 100, 0); Really? Did you try to compile the file after this patch? http://git.linuxtv.org/cgit.cgi/media_tree.git/tree/drivers/media/pci/cx18/cx18-alsa-mixer.c#n143 They are referenced later in the same file. This is only half a fix. You can either remove the cx18-alsa-mixer.* files and from the build system, or even better,you can hook-up and initialize these callbacks with alsa so alsa mixer controls show up for cx18. :) Hi Ok sorry :-( Sure, I compile everything as allyesconfig, allmodconfig and allnoconfig. So snd_cx18_mixer_tv_volume_info is the same as snd_cx18_mixer_tv_vol_info then. Would gladly done something a little more concrete. But first I want to see if as I can go through all of the approximately 2000 functions that are not in use. Kind regards Rickard Strandqvist -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2] media: v4l2-core: v4l2-dv-timings.c: Cleaning up code wrong value used in aspect ratio.
Wrong value used in same cases for the aspect ratio. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- drivers/media/v4l2-core/v4l2-dv-timings.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-dv-timings.c b/drivers/media/v4l2-core/v4l2-dv-timings.c index 48b20df..eb3850c 100644 --- a/drivers/media/v4l2-core/v4l2-dv-timings.c +++ b/drivers/media/v4l2-core/v4l2-dv-timings.c @@ -599,10 +599,10 @@ struct v4l2_fract v4l2_calc_aspect_ratio(u8 hor_landscape, u8 vert_portrait) aspect.denominator = 9; } else if (ratio == 34) { aspect.numerator = 4; - aspect.numerator = 3; + aspect.denominator = 3; } else if (ratio == 68) { aspect.numerator = 15; - aspect.numerator = 9; + aspect.denominator = 9; } else { aspect.numerator = hor_landscape + 99; aspect.denominator = 100; -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2] media: v4l2-core: v4l2-dv-timings.c: Cleaning up code wrong value used in aspect ratio.
Wrong value used in same cases for the aspect ratio. This is likely a cut and paste mistake. This was partly found using a static code analysis program called cppcheck. Rickard Strandqvist (1): media: v4l2-core: v4l2-dv-timings.c: Cleaning up code wrong value used in aspect ratio. drivers/media/v4l2-core/v4l2-dv-timings.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] media: v4l2-core: v4l2-dv-timings.c: Cleaning up code that putting values to the same variable twice
Instead of putting the same variable twice, was rather intended to set this value to two different variable. This was partly found using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- drivers/media/v4l2-core/v4l2-dv-timings.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-dv-timings.c b/drivers/media/v4l2-core/v4l2-dv-timings.c index 48b20df..eb3850c 100644 --- a/drivers/media/v4l2-core/v4l2-dv-timings.c +++ b/drivers/media/v4l2-core/v4l2-dv-timings.c @@ -599,10 +599,10 @@ struct v4l2_fract v4l2_calc_aspect_ratio(u8 hor_landscape, u8 vert_portrait) aspect.denominator = 9; } else if (ratio == 34) { aspect.numerator = 4; - aspect.numerator = 3; + aspect.denominator = 3; } else if (ratio == 68) { aspect.numerator = 15; - aspect.numerator = 9; + aspect.denominator = 9; } else { aspect.numerator = hor_landscape + 99; aspect.denominator = 100; -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] media: usb: dvb-usb-v2: mxl111sf.c: Cleaning up uninitialized variables
There is a risk that the variable will be used without being initialized. This was largely found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- drivers/media/usb/dvb-usb-v2/mxl111sf.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/dvb-usb-v2/mxl111sf.c b/drivers/media/usb/dvb-usb-v2/mxl111sf.c index c7304fa..b8a707e 100644 --- a/drivers/media/usb/dvb-usb-v2/mxl111sf.c +++ b/drivers/media/usb/dvb-usb-v2/mxl111sf.c @@ -129,7 +129,7 @@ int mxl111sf_write_reg_mask(struct mxl111sf_state *state, u8 addr, u8 mask, u8 data) { int ret; - u8 val; + u8 val = 0; if (mask != 0xff) { ret = mxl111sf_read_reg(state, addr, val); -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html