Commit 87c01486 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Mauro Carvalho Chehab
Browse files

media: dib0090: fix duplicated code for different branches



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: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent d4e192cc
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -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;
				}
				Den = 255;
			}
			dib0090_write_reg(state, 0x15, (u16) FBDiv);