Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1714510
| From | "Gustavo A. R. Silva" <gustavo@embeddedor.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] dib0090: fix duplicated code for different branches |
| Date | 2017-08-18 03:30 +0200 |
| Message-ID | <ufEgP-4CU-19@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Refactor code in order to avoid identical code for different branches.
This issue was detected with the help of Coccinelle.
Addresses-Coverity-ID: 1226795
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
This code was tested by compilation only.
drivers/media/dvb-frontends/dib0090.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/media/dvb-frontends/dib0090.c b/drivers/media/dvb-frontends/dib0090.c
index ae53a19..d9d730d 100644
--- a/drivers/media/dvb-frontends/dib0090.c
+++ b/drivers/media/dvb-frontends/dib0090.c
@@ -2435,14 +2435,7 @@ static int dib0090_tune(struct dvb_frontend *fe)
Den = 1;
if (Rest > 0) {
- if (state->config->analog_output)
- lo6 |= (1 << 2) | 2;
- else {
- if (state->identity.in_soc)
- lo6 |= (1 << 2) | 2;
- else
- lo6 |= (1 << 2) | 2;
- }
+ lo6 |= (1 << 2) | 2;
Den = 255;
}
dib0090_write_reg(state, 0x15, (u16) FBDiv);
--
2.5.0
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH] dib0090: fix duplicated code for different branches "Gustavo A. R. Silva" <gustavo@embeddedor.com> - 2017-08-18 03:30 +0200
csiph-web