Commit 9aa4d4ea authored by Markus Elfring's avatar Markus Elfring Committed by Mauro Carvalho Chehab

media: usb: don't initialize vars if not needed

Some local variables will be set to an appropriate value before usage.
Thus omit explicit initialisations at the beginning of these functions.
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Acked-by: default avatarAlexey Klimov <klimov.linux@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 7b69f2cb
......@@ -511,7 +511,7 @@ static int usb_amradio_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{
struct amradio_device *radio;
int retval = 0;
int retval;
radio = kzalloc(sizeof(struct amradio_device), GFP_KERNEL);
......
......@@ -671,7 +671,7 @@ static int wl1273_fm_start(struct wl1273_device *radio, int new_mode)
static int wl1273_fm_suspend(struct wl1273_device *radio)
{
struct wl1273_core *core = radio->core;
int r = 0;
int r;
/* Cannot go from OFF to SUSPENDED */
if (core->mode == WL1273_MODE_RX)
......
......@@ -578,7 +578,7 @@ static int si470x_usb_driver_probe(struct usb_interface *intf,
struct si470x_device *radio;
struct usb_host_interface *iface_desc;
struct usb_endpoint_descriptor *endpoint;
int i, int_end_size, retval = 0;
int i, int_end_size, retval;
unsigned char version_warning = 0;
/* private data allocation and initialization */
......
......@@ -1217,7 +1217,7 @@ static void cx231xx_config_tuner(struct cx231xx *dev)
static int read_eeprom(struct cx231xx *dev, struct i2c_client *client,
u8 *eedata, int len)
{
int ret = 0;
int ret;
u8 start_offset = 0;
int len_todo = len;
u8 *eedata_cur = eedata;
......
......@@ -630,7 +630,7 @@ static void unregister_dvb(struct cx231xx_dvb *dvb)
static int dvb_init(struct cx231xx *dev)
{
int result = 0;
int result;
struct cx231xx_dvb *dvb;
struct i2c_adapter *tuner_i2c;
struct i2c_adapter *demod_i2c;
......
......@@ -227,7 +227,7 @@ int go7007_snd_init(struct go7007 *go)
{
static int dev;
struct go7007_snd *gosnd;
int ret = 0;
int ret;
if (dev >= SNDRV_CARDS)
return -ENODEV;
......
......@@ -1174,7 +1174,7 @@ static int tm6000_usb_probe(struct usb_interface *interface,
{
struct usb_device *usbdev;
struct tm6000_core *dev;
int i, rc = 0;
int i, rc;
int nr = 0;
char *speed;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment