diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-02-03 13:36:28 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-02-03 13:38:48 -0500 |
commit | e181b1f19045a5843aefafa561207fbea8bd2973 (patch) | |
tree | 2822c36a45922766444d3fefd055a8b3488cd386 /drivers/media | |
parent | bda977b7318a4ec10648fe5f80b6ecb42edea7bb (diff) |
[media] rtl28xxu: properly initialize pdata
As complained by smatch:
drivers/media/usb/dvb-usb-v2/rtl28xxu.c:1159 rtl2832u_tuner_attach() info: 'pdata' is not actually initialized (unreached code).
Cc: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/usb/dvb-usb-v2/rtl28xxu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c index d88f7994bc7c..77dcfdf547ac 100644 --- a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c +++ b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c | |||
@@ -1055,10 +1055,13 @@ static int rtl2832u_tuner_attach(struct dvb_usb_adapter *adap) | |||
1055 | struct i2c_board_info info; | 1055 | struct i2c_board_info info; |
1056 | struct i2c_client *client; | 1056 | struct i2c_client *client; |
1057 | struct v4l2_subdev *subdev = NULL; | 1057 | struct v4l2_subdev *subdev = NULL; |
1058 | struct platform_device *pdev; | ||
1059 | struct rtl2832_sdr_platform_data pdata; | ||
1058 | 1060 | ||
1059 | dev_dbg(&d->intf->dev, "\n"); | 1061 | dev_dbg(&d->intf->dev, "\n"); |
1060 | 1062 | ||
1061 | memset(&info, 0, sizeof(struct i2c_board_info)); | 1063 | memset(&info, 0, sizeof(struct i2c_board_info)); |
1064 | memset(&pdata, 0, sizeof(pdata)); | ||
1062 | 1065 | ||
1063 | switch (dev->tuner) { | 1066 | switch (dev->tuner) { |
1064 | case TUNER_RTL2832_FC0012: | 1067 | case TUNER_RTL2832_FC0012: |
@@ -1155,9 +1158,6 @@ static int rtl2832u_tuner_attach(struct dvb_usb_adapter *adap) | |||
1155 | 1158 | ||
1156 | /* register SDR */ | 1159 | /* register SDR */ |
1157 | switch (dev->tuner) { | 1160 | switch (dev->tuner) { |
1158 | struct platform_device *pdev; | ||
1159 | struct rtl2832_sdr_platform_data pdata = {}; | ||
1160 | |||
1161 | case TUNER_RTL2832_FC0012: | 1161 | case TUNER_RTL2832_FC0012: |
1162 | case TUNER_RTL2832_FC0013: | 1162 | case TUNER_RTL2832_FC0013: |
1163 | case TUNER_RTL2832_E4000: | 1163 | case TUNER_RTL2832_E4000: |