From: Colin Ian King Date: Tue, 16 Jan 2024 11:50:02 +0000 (+0100) Subject: media: dvb: remove redundant assignment to variable ret X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=2386ae062c647a6ee5f93d2581b45d48cce677e3;p=linux.git 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 Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb-frontends/bcm3510.c b/drivers/media/dvb-frontends/bcm3510.c index b3f5c49accafd..27f1de21f5717 100644 --- a/drivers/media/dvb-frontends/bcm3510.c +++ b/drivers/media/dvb-frontends/bcm3510.c @@ -797,7 +797,6 @@ struct dvb_frontend* bcm3510_attach(const struct bcm3510_config *config, struct i2c_adapter *i2c) { struct bcm3510_state* state = NULL; - int ret; bcm3510_register_value v; /* allocate memory for the internal state */ @@ -816,7 +815,7 @@ struct dvb_frontend* bcm3510_attach(const struct bcm3510_config *config, mutex_init(&state->hab_mutex); - if ((ret = bcm3510_readB(state,0xe0,&v)) < 0) + if (bcm3510_readB(state, 0xe0, &v) < 0) goto error; deb_info("Revision: 0x%1x, Layer: 0x%1x.\n",v.REVID_e0.REV,v.REVID_e0.LAYER);