Skip to content

Commit

Permalink
media: sp887x: drop unneeded assignment
Browse files Browse the repository at this point in the history
The pointer 'mem' was initialized to 'fw->data' but immediately after
that it was assigned 'fw->data + 10'. Lets remove the extra assignement
and initialize the pointer to the address its going to use.

Link: https://lore.kernel.org/linux-media/[email protected]

Cc: Sudip Mukherjee <[email protected]>
Signed-off-by: Sudip Mukherjee <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
sudipm-mukherjee authored and mchehab committed Nov 19, 2021
1 parent 51c2664 commit e594cda
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/media/dvb-frontends/sp887x.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,16 +140,14 @@ static int sp887x_initial_setup (struct dvb_frontend* fe, const struct firmware
u8 buf [BLOCKSIZE + 2];
int i;
int fw_size = fw->size;
const unsigned char *mem = fw->data;
const unsigned char *mem = fw->data + 10;

dprintk("%s\n", __func__);

/* ignore the first 10 bytes, then we expect 0x4000 bytes of firmware */
if (fw_size < FW_SIZE + 10)
return -ENODEV;

mem = fw->data + 10;

/* soft reset */
sp887x_writereg(state, 0xf1a, 0x000);

Expand Down

0 comments on commit e594cda

Please sign in to comment.