]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
media: usb: don't initialize vars if not needed
authorMarkus Elfring <elfring@users.sourceforge.net>
Thu, 22 Feb 2018 20:45:47 +0000 (15:45 -0500)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 6 Mar 2018 15:39:59 +0000 (10:39 -0500)
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: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/radio/radio-mr800.c
drivers/media/radio/radio-wl1273.c
drivers/media/radio/si470x/radio-si470x-usb.c
drivers/media/usb/cx231xx/cx231xx-cards.c
drivers/media/usb/cx231xx/cx231xx-dvb.c
drivers/media/usb/go7007/snd-go7007.c
drivers/media/usb/tm6000/tm6000-cards.c

index dc6c4f9859117d9c8ad7d5b74a88c8f41ce1005c..0f292c6ba338f06e3a03f77bf869ef684d084b43 100644 (file)
@@ -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);
 
index 58e944591602617e4af5e0913d99054340935f8c..8f9f8dfc349765f67b807ce198229251bcdabe3a 100644 (file)
@@ -671,7 +671,7 @@ fail:
 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)
index c311f9951d80663f2a2c6745d383776cc89f1419..2277e850bb5ece0110722706d95088288b276df1 100644 (file)
@@ -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 */
index 8582568f0dcd36089fd9ac7feac33b505ea16bba..c5edbd5bdb7e22be063cce54cbe93fcef546d8ac 100644 (file)
@@ -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;
index 63deca9b5017cdfb2e463e9d82e92eb47f0ef3cf..7c3863ad6f2391e5d447b20a237c855d99b4b5f1 100644 (file)
@@ -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;
index c618764480c67eabc0717e6393208087a26b3156..f84a2130f0336cfd2e9e1e79e5ebbd6cd64ab455 100644 (file)
@@ -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;
index 4d5f4cc4887e6a0a79707c20af0f2b5eb7459382..70939e96b85632be8ac07dc065fc1ac3d5431eb1 100644 (file)
@@ -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;