Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: dvb: remove redundant assignment to variable ret

The variable ret is being assigned a value but it isn't being
read afterwards. The assignment is redundant and so ret can be
removed. Also add spaces after , to clean up checkpatch warnings.

Cleans up clang scan build warning:
warning: Although the value stored to 'ret' is used in the
enclosing expression, the value is never actually read from
'ret' [deadcode.DeadStores]

Link: https://lore.kernel.org/linux-media/20240116115002.2265367-1-colin.i.king@gmail.com
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>

authored by

Colin Ian King and committed by
Mauro Carvalho Chehab
2386ae06 2350d4d4

+1 -2
+1 -2
drivers/media/dvb-frontends/bcm3510.c
··· 797 797 struct i2c_adapter *i2c) 798 798 { 799 799 struct bcm3510_state* state = NULL; 800 - int ret; 801 800 bcm3510_register_value v; 802 801 803 802 /* allocate memory for the internal state */ ··· 815 816 816 817 mutex_init(&state->hab_mutex); 817 818 818 - if ((ret = bcm3510_readB(state,0xe0,&v)) < 0) 819 + if (bcm3510_readB(state, 0xe0, &v) < 0) 819 820 goto error; 820 821 821 822 deb_info("Revision: 0x%1x, Layer: 0x%1x.\n",v.REVID_e0.REV,v.REVID_e0.LAYER);