cx23885-dvb: move initialization of a8293_pdata
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 18 Dec 2015 16:22:21 +0000 (14:22 -0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2017 10:22:51 +0000 (11:22 +0100)
commit9205be7fa6323a0a7d049cf434134d8e5b54047a
tree05917d3adf12182a6fea1a78090b59511f2223a2
parent6b59fb520123e28fd18f73d69aa89c1d3eb402f9
cx23885-dvb: move initialization of a8293_pdata

commit f0b0faff78c2c2e8efe843de55405a1f0470b8c4 upstream.

Smatch complains about where the au8293_data is placed:

drivers/media/pci/cx23885/cx23885-dvb.c:2174 dvb_register() info: 'a8293_pdata' is not actually initialized (unreached code).

It is not actually expected to have such initialization at

switch {
foo = bar;

case:
...
}

Not really sure how gcc does that, but this is something that I would
expect that different compilers would do different things.

David Howells checked with the compiler people: it's not really expected to
initialise as expected.

So, move the initialization outside the switch(), making smatch to
shut up one warning.

Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/pci/cx23885/cx23885-dvb.c