media: drivers: delete unnecessary variable initialisations
authorMarkus Elfring <elfring@users.sourceforge.net>
Wed, 30 Aug 2017 06:10:38 +0000 (02:10 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sat, 23 Sep 2017 12:20:01 +0000 (08:20 -0400)
The variables will be set to an appropriate value before usage.
Thus omit the explicit initialisation at the beginning.

[mchehab@s-opensource.com: fold similar patches into one]

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
drivers/media/dvb-frontends/cx24116.c
drivers/media/dvb-frontends/ds3000.c
drivers/media/pci/mantis/hopper_cards.c
drivers/media/pci/mantis/mantis_cards.c

index 96af4ff..e5135fb 100644 (file)
@@ -221,7 +221,7 @@ static int cx24116_writereg(struct cx24116_state *state, int reg, int data)
 static int cx24116_writeregN(struct cx24116_state *state, int reg,
                             const u8 *data, u16 len)
 {
-       int ret = -EREMOTEIO;
+       int ret;
        struct i2c_msg msg;
        u8 *buf;
 
@@ -1120,7 +1120,7 @@ static const struct dvb_frontend_ops cx24116_ops;
 struct dvb_frontend *cx24116_attach(const struct cx24116_config *config,
        struct i2c_adapter *i2c)
 {
-       struct cx24116_state *state = NULL;
+       struct cx24116_state *state;
        int ret;
 
        dprintk("%s\n", __func__);
index c2959a9..293c410 100644 (file)
@@ -833,7 +833,7 @@ static const struct dvb_frontend_ops ds3000_ops;
 struct dvb_frontend *ds3000_attach(const struct ds3000_config *config,
                                    struct i2c_adapter *i2c)
 {
-       struct ds3000_state *state = NULL;
+       struct ds3000_state *state;
        int ret;
 
        dprintk("%s\n", __func__);
index 0c91df3..a96ac01 100644 (file)
@@ -161,7 +161,7 @@ static int hopper_pci_probe(struct pci_dev *pdev,
        struct mantis_pci_drvdata *drvdata;
        struct mantis_pci *mantis;
        struct mantis_hwconfig *config;
-       int err = 0;
+       int err;
 
        mantis = kzalloc(sizeof(struct mantis_pci), GFP_KERNEL);
        if (mantis == NULL) {
index 2dba030..9958b6f 100644 (file)
@@ -171,7 +171,7 @@ static int mantis_pci_probe(struct pci_dev *pdev,
        struct mantis_pci_drvdata *drvdata;
        struct mantis_pci *mantis;
        struct mantis_hwconfig *config;
-       int err = 0;
+       int err;
 
        mantis = kzalloc(sizeof(struct mantis_pci), GFP_KERNEL);
        if (!mantis)