* [PATCH 0/7] [media] Mantis: Adjustments for three function implementations
@ 2017-09-02 20:40 ` SF Markus Elfring
0 siblings, 0 replies; 16+ messages in thread
From: SF Markus Elfring @ 2017-09-02 20:40 UTC (permalink / raw)
To: linux-media, Mauro Carvalho Chehab; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 2 Sep 2017 22:18:22 +0200
A few update suggestions were taken into account
from static source code analysis.
Markus Elfring (7):
Delete an error message for a failed memory allocation in hopper_pci_probe()
Improve a size determination in hopper_pci_probe()
Adjust a null pointer check in two functions
Delete an unnecessary variable initialisation in hopper_pci_probe()
Delete an error message for a failed memory allocation in mantis_pci_probe()
Improve a size determination in mantis_pci_probe()
Delete an unnecessary variable initialisation in mantis_pci_probe()
drivers/media/pci/mantis/hopper_cards.c | 9 ++++-----
drivers/media/pci/mantis/mantis_cards.c | 8 +++-----
2 files changed, 7 insertions(+), 10 deletions(-)
--
2.14.1
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 0/7] [media] Mantis: Adjustments for three function implementations
@ 2017-09-02 20:40 ` SF Markus Elfring
0 siblings, 0 replies; 16+ messages in thread
From: SF Markus Elfring @ 2017-09-02 20:40 UTC (permalink / raw)
To: linux-media, Mauro Carvalho Chehab; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 2 Sep 2017 22:18:22 +0200
A few update suggestions were taken into account
from static source code analysis.
Markus Elfring (7):
Delete an error message for a failed memory allocation in hopper_pci_probe()
Improve a size determination in hopper_pci_probe()
Adjust a null pointer check in two functions
Delete an unnecessary variable initialisation in hopper_pci_probe()
Delete an error message for a failed memory allocation in mantis_pci_probe()
Improve a size determination in mantis_pci_probe()
Delete an unnecessary variable initialisation in mantis_pci_probe()
drivers/media/pci/mantis/hopper_cards.c | 9 ++++-----
drivers/media/pci/mantis/mantis_cards.c | 8 +++-----
2 files changed, 7 insertions(+), 10 deletions(-)
--
2.14.1
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 1/7] [media] Hopper: Delete an error message for a failed memory allocation in hopper_pci_probe()
2017-09-02 20:40 ` SF Markus Elfring
@ 2017-09-02 20:41 ` SF Markus Elfring
-1 siblings, 0 replies; 16+ messages in thread
From: SF Markus Elfring @ 2017-09-02 20:41 UTC (permalink / raw)
To: linux-media, Mauro Carvalho Chehab; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 2 Sep 2017 21:19:05 +0200
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/media/pci/mantis/hopper_cards.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/media/pci/mantis/hopper_cards.c b/drivers/media/pci/mantis/hopper_cards.c
index 68b5800030b7..cc1bb04d8cb4 100644
--- a/drivers/media/pci/mantis/hopper_cards.c
+++ b/drivers/media/pci/mantis/hopper_cards.c
@@ -168,4 +168,3 @@ static int hopper_pci_probe(struct pci_dev *pdev,
- printk(KERN_ERR "%s ERROR: Out of memory\n", __func__);
err = -ENOMEM;
goto fail0;
}
--
2.14.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 1/7] [media] Hopper: Delete an error message for a failed memory allocation in hopper_pci_pro
@ 2017-09-02 20:41 ` SF Markus Elfring
0 siblings, 0 replies; 16+ messages in thread
From: SF Markus Elfring @ 2017-09-02 20:41 UTC (permalink / raw)
To: linux-media, Mauro Carvalho Chehab; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 2 Sep 2017 21:19:05 +0200
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/media/pci/mantis/hopper_cards.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/media/pci/mantis/hopper_cards.c b/drivers/media/pci/mantis/hopper_cards.c
index 68b5800030b7..cc1bb04d8cb4 100644
--- a/drivers/media/pci/mantis/hopper_cards.c
+++ b/drivers/media/pci/mantis/hopper_cards.c
@@ -168,4 +168,3 @@ static int hopper_pci_probe(struct pci_dev *pdev,
- printk(KERN_ERR "%s ERROR: Out of memory\n", __func__);
err = -ENOMEM;
goto fail0;
}
--
2.14.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/7] [media] Hopper: Improve a size determination in hopper_pci_probe()
2017-09-02 20:40 ` SF Markus Elfring
@ 2017-09-02 20:42 ` SF Markus Elfring
-1 siblings, 0 replies; 16+ messages in thread
From: SF Markus Elfring @ 2017-09-02 20:42 UTC (permalink / raw)
To: linux-media, Mauro Carvalho Chehab; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 2 Sep 2017 21:21:22 +0200
Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/media/pci/mantis/hopper_cards.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/pci/mantis/hopper_cards.c b/drivers/media/pci/mantis/hopper_cards.c
index cc1bb04d8cb4..fe7b40c306f7 100644
--- a/drivers/media/pci/mantis/hopper_cards.c
+++ b/drivers/media/pci/mantis/hopper_cards.c
@@ -163,7 +163,7 @@ static int hopper_pci_probe(struct pci_dev *pdev,
struct mantis_hwconfig *config;
int err = 0;
- mantis = kzalloc(sizeof(struct mantis_pci), GFP_KERNEL);
+ mantis = kzalloc(sizeof(*mantis), GFP_KERNEL);
if (mantis == NULL) {
err = -ENOMEM;
goto fail0;
--
2.14.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/7] [media] Hopper: Improve a size determination in hopper_pci_probe()
@ 2017-09-02 20:42 ` SF Markus Elfring
0 siblings, 0 replies; 16+ messages in thread
From: SF Markus Elfring @ 2017-09-02 20:42 UTC (permalink / raw)
To: linux-media, Mauro Carvalho Chehab; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 2 Sep 2017 21:21:22 +0200
Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/media/pci/mantis/hopper_cards.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/pci/mantis/hopper_cards.c b/drivers/media/pci/mantis/hopper_cards.c
index cc1bb04d8cb4..fe7b40c306f7 100644
--- a/drivers/media/pci/mantis/hopper_cards.c
+++ b/drivers/media/pci/mantis/hopper_cards.c
@@ -163,7 +163,7 @@ static int hopper_pci_probe(struct pci_dev *pdev,
struct mantis_hwconfig *config;
int err = 0;
- mantis = kzalloc(sizeof(struct mantis_pci), GFP_KERNEL);
+ mantis = kzalloc(sizeof(*mantis), GFP_KERNEL);
if (mantis = NULL) {
err = -ENOMEM;
goto fail0;
--
2.14.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 3/7] [media] Hopper: Adjust a null pointer check in two functions
2017-09-02 20:40 ` SF Markus Elfring
@ 2017-09-02 20:43 ` SF Markus Elfring
-1 siblings, 0 replies; 16+ messages in thread
From: SF Markus Elfring @ 2017-09-02 20:43 UTC (permalink / raw)
To: linux-media, Mauro Carvalho Chehab; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 2 Sep 2017 21:25:50 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The script “checkpatch.pl” pointed information out like the following.
Comparison to NULL could be written !…
Thus fix the affected source code places.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/media/pci/mantis/hopper_cards.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/pci/mantis/hopper_cards.c b/drivers/media/pci/mantis/hopper_cards.c
index fe7b40c306f7..88e5b2a97005 100644
--- a/drivers/media/pci/mantis/hopper_cards.c
+++ b/drivers/media/pci/mantis/hopper_cards.c
@@ -72,7 +72,7 @@ static irqreturn_t hopper_irq_handler(int irq, void *dev_id)
struct mantis_ca *ca;
mantis = (struct mantis_pci *) dev_id;
- if (unlikely(mantis == NULL)) {
+ if (unlikely(!mantis)) {
dprintk(MANTIS_ERROR, 1, "Mantis == NULL");
return IRQ_NONE;
}
@@ -164,7 +164,7 @@ static int hopper_pci_probe(struct pci_dev *pdev,
int err = 0;
mantis = kzalloc(sizeof(*mantis), GFP_KERNEL);
- if (mantis == NULL) {
+ if (!mantis) {
err = -ENOMEM;
goto fail0;
}
--
2.14.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 3/7] [media] Hopper: Adjust a null pointer check in two functions
@ 2017-09-02 20:43 ` SF Markus Elfring
0 siblings, 0 replies; 16+ messages in thread
From: SF Markus Elfring @ 2017-09-02 20:43 UTC (permalink / raw)
To: linux-media, Mauro Carvalho Chehab; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 2 Sep 2017 21:25:50 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The script “checkpatch.pl” pointed information out like the following.
Comparison to NULL could be written !…
Thus fix the affected source code places.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/media/pci/mantis/hopper_cards.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/pci/mantis/hopper_cards.c b/drivers/media/pci/mantis/hopper_cards.c
index fe7b40c306f7..88e5b2a97005 100644
--- a/drivers/media/pci/mantis/hopper_cards.c
+++ b/drivers/media/pci/mantis/hopper_cards.c
@@ -72,7 +72,7 @@ static irqreturn_t hopper_irq_handler(int irq, void *dev_id)
struct mantis_ca *ca;
mantis = (struct mantis_pci *) dev_id;
- if (unlikely(mantis = NULL)) {
+ if (unlikely(!mantis)) {
dprintk(MANTIS_ERROR, 1, "Mantis = NULL");
return IRQ_NONE;
}
@@ -164,7 +164,7 @@ static int hopper_pci_probe(struct pci_dev *pdev,
int err = 0;
mantis = kzalloc(sizeof(*mantis), GFP_KERNEL);
- if (mantis = NULL) {
+ if (!mantis) {
err = -ENOMEM;
goto fail0;
}
--
2.14.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 4/7] [media] Hopper: Delete an unnecessary variable initialisation in hopper_pci_probe()
2017-09-02 20:40 ` SF Markus Elfring
@ 2017-09-02 20:44 ` SF Markus Elfring
-1 siblings, 0 replies; 16+ messages in thread
From: SF Markus Elfring @ 2017-09-02 20:44 UTC (permalink / raw)
To: linux-media, Mauro Carvalho Chehab; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 2 Sep 2017 21:50:55 +0200
The variable "err" will be set to an appropriate value a bit later.
Thus omit the explicit initialisation at the beginning.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/media/pci/mantis/hopper_cards.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/pci/mantis/hopper_cards.c b/drivers/media/pci/mantis/hopper_cards.c
index 88e5b2a97005..3826be19c156 100644
--- a/drivers/media/pci/mantis/hopper_cards.c
+++ b/drivers/media/pci/mantis/hopper_cards.c
@@ -161,6 +161,6 @@ 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(*mantis), GFP_KERNEL);
--
2.14.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 4/7] [media] Hopper: Delete an unnecessary variable initialisation in hopper_pci_probe()
@ 2017-09-02 20:44 ` SF Markus Elfring
0 siblings, 0 replies; 16+ messages in thread
From: SF Markus Elfring @ 2017-09-02 20:44 UTC (permalink / raw)
To: linux-media, Mauro Carvalho Chehab; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 2 Sep 2017 21:50:55 +0200
The variable "err" will be set to an appropriate value a bit later.
Thus omit the explicit initialisation at the beginning.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/media/pci/mantis/hopper_cards.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/pci/mantis/hopper_cards.c b/drivers/media/pci/mantis/hopper_cards.c
index 88e5b2a97005..3826be19c156 100644
--- a/drivers/media/pci/mantis/hopper_cards.c
+++ b/drivers/media/pci/mantis/hopper_cards.c
@@ -161,6 +161,6 @@ 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(*mantis), GFP_KERNEL);
--
2.14.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 5/7] [media] Mantis: Delete an error message for a failed memory allocation in mantis_pci_probe()
2017-09-02 20:40 ` SF Markus Elfring
@ 2017-09-02 20:45 ` SF Markus Elfring
-1 siblings, 0 replies; 16+ messages in thread
From: SF Markus Elfring @ 2017-09-02 20:45 UTC (permalink / raw)
To: linux-media, Mauro Carvalho Chehab; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 2 Sep 2017 21:55:05 +0200
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/media/pci/mantis/mantis_cards.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/media/pci/mantis/mantis_cards.c b/drivers/media/pci/mantis/mantis_cards.c
index cdefffc16d9e..56a01f6f84c7 100644
--- a/drivers/media/pci/mantis/mantis_cards.c
+++ b/drivers/media/pci/mantis/mantis_cards.c
@@ -177,7 +177,5 @@ static int mantis_pci_probe(struct pci_dev *pdev,
- if (mantis == NULL) {
- printk(KERN_ERR "%s ERROR: Out of memory\n", __func__);
+ if (!mantis)
return -ENOMEM;
- }
drvdata = (void *)pci_id->driver_data;
mantis->num = devs;
--
2.14.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 5/7] [media] Mantis: Delete an error message for a failed memory allocation in mantis_pci_pro
@ 2017-09-02 20:45 ` SF Markus Elfring
0 siblings, 0 replies; 16+ messages in thread
From: SF Markus Elfring @ 2017-09-02 20:45 UTC (permalink / raw)
To: linux-media, Mauro Carvalho Chehab; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 2 Sep 2017 21:55:05 +0200
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/media/pci/mantis/mantis_cards.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/media/pci/mantis/mantis_cards.c b/drivers/media/pci/mantis/mantis_cards.c
index cdefffc16d9e..56a01f6f84c7 100644
--- a/drivers/media/pci/mantis/mantis_cards.c
+++ b/drivers/media/pci/mantis/mantis_cards.c
@@ -177,7 +177,5 @@ static int mantis_pci_probe(struct pci_dev *pdev,
- if (mantis = NULL) {
- printk(KERN_ERR "%s ERROR: Out of memory\n", __func__);
+ if (!mantis)
return -ENOMEM;
- }
drvdata = (void *)pci_id->driver_data;
mantis->num = devs;
--
2.14.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 6/7] [media] Mantis: Improve a size determination in mantis_pci_probe()
2017-09-02 20:40 ` SF Markus Elfring
@ 2017-09-02 20:46 ` SF Markus Elfring
-1 siblings, 0 replies; 16+ messages in thread
From: SF Markus Elfring @ 2017-09-02 20:46 UTC (permalink / raw)
To: linux-media, Mauro Carvalho Chehab; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 2 Sep 2017 21:56:07 +0200
Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/media/pci/mantis/mantis_cards.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/pci/mantis/mantis_cards.c b/drivers/media/pci/mantis/mantis_cards.c
index 56a01f6f84c7..6182ae44dd23 100644
--- a/drivers/media/pci/mantis/mantis_cards.c
+++ b/drivers/media/pci/mantis/mantis_cards.c
@@ -173,5 +173,5 @@ static int mantis_pci_probe(struct pci_dev *pdev,
struct mantis_hwconfig *config;
int err = 0;
- mantis = kzalloc(sizeof(struct mantis_pci), GFP_KERNEL);
+ mantis = kzalloc(sizeof(*mantis), GFP_KERNEL);
if (!mantis)
--
2.14.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 6/7] [media] Mantis: Improve a size determination in mantis_pci_probe()
@ 2017-09-02 20:46 ` SF Markus Elfring
0 siblings, 0 replies; 16+ messages in thread
From: SF Markus Elfring @ 2017-09-02 20:46 UTC (permalink / raw)
To: linux-media, Mauro Carvalho Chehab; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 2 Sep 2017 21:56:07 +0200
Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/media/pci/mantis/mantis_cards.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/pci/mantis/mantis_cards.c b/drivers/media/pci/mantis/mantis_cards.c
index 56a01f6f84c7..6182ae44dd23 100644
--- a/drivers/media/pci/mantis/mantis_cards.c
+++ b/drivers/media/pci/mantis/mantis_cards.c
@@ -173,5 +173,5 @@ static int mantis_pci_probe(struct pci_dev *pdev,
struct mantis_hwconfig *config;
int err = 0;
- mantis = kzalloc(sizeof(struct mantis_pci), GFP_KERNEL);
+ mantis = kzalloc(sizeof(*mantis), GFP_KERNEL);
if (!mantis)
--
2.14.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 7/7] [media] Mantis: Delete an unnecessary variable initialisation in mantis_pci_probe()
2017-09-02 20:40 ` SF Markus Elfring
@ 2017-09-02 20:47 ` SF Markus Elfring
-1 siblings, 0 replies; 16+ messages in thread
From: SF Markus Elfring @ 2017-09-02 20:47 UTC (permalink / raw)
To: linux-media, Mauro Carvalho Chehab; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 2 Sep 2017 22:05:22 +0200
The variable "err" will eventually be set to an appropriate value
a bit later. Thus omit the explicit initialisation at the beginning.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/media/pci/mantis/mantis_cards.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/pci/mantis/mantis_cards.c b/drivers/media/pci/mantis/mantis_cards.c
index 6182ae44dd23..33dd99da0ed8 100644
--- a/drivers/media/pci/mantis/mantis_cards.c
+++ b/drivers/media/pci/mantis/mantis_cards.c
@@ -171,6 +171,6 @@ 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(*mantis), GFP_KERNEL);
--
2.14.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 7/7] [media] Mantis: Delete an unnecessary variable initialisation in mantis_pci_probe()
@ 2017-09-02 20:47 ` SF Markus Elfring
0 siblings, 0 replies; 16+ messages in thread
From: SF Markus Elfring @ 2017-09-02 20:47 UTC (permalink / raw)
To: linux-media, Mauro Carvalho Chehab; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 2 Sep 2017 22:05:22 +0200
The variable "err" will eventually be set to an appropriate value
a bit later. Thus omit the explicit initialisation at the beginning.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/media/pci/mantis/mantis_cards.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/pci/mantis/mantis_cards.c b/drivers/media/pci/mantis/mantis_cards.c
index 6182ae44dd23..33dd99da0ed8 100644
--- a/drivers/media/pci/mantis/mantis_cards.c
+++ b/drivers/media/pci/mantis/mantis_cards.c
@@ -171,6 +171,6 @@ 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(*mantis), GFP_KERNEL);
--
2.14.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
end of thread, other threads:[~2017-09-02 20:47 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-02 20:40 [PATCH 0/7] [media] Mantis: Adjustments for three function implementations SF Markus Elfring
2017-09-02 20:40 ` SF Markus Elfring
2017-09-02 20:41 ` [PATCH 1/7] [media] Hopper: Delete an error message for a failed memory allocation in hopper_pci_probe() SF Markus Elfring
2017-09-02 20:41 ` [PATCH 1/7] [media] Hopper: Delete an error message for a failed memory allocation in hopper_pci_pro SF Markus Elfring
2017-09-02 20:42 ` [PATCH 2/7] [media] Hopper: Improve a size determination in hopper_pci_probe() SF Markus Elfring
2017-09-02 20:42 ` SF Markus Elfring
2017-09-02 20:43 ` [PATCH 3/7] [media] Hopper: Adjust a null pointer check in two functions SF Markus Elfring
2017-09-02 20:43 ` SF Markus Elfring
2017-09-02 20:44 ` [PATCH 4/7] [media] Hopper: Delete an unnecessary variable initialisation in hopper_pci_probe() SF Markus Elfring
2017-09-02 20:44 ` SF Markus Elfring
2017-09-02 20:45 ` [PATCH 5/7] [media] Mantis: Delete an error message for a failed memory allocation in mantis_pci_probe() SF Markus Elfring
2017-09-02 20:45 ` [PATCH 5/7] [media] Mantis: Delete an error message for a failed memory allocation in mantis_pci_pro SF Markus Elfring
2017-09-02 20:46 ` [PATCH 6/7] [media] Mantis: Improve a size determination in mantis_pci_probe() SF Markus Elfring
2017-09-02 20:46 ` SF Markus Elfring
2017-09-02 20:47 ` [PATCH 7/7] [media] Mantis: Delete an unnecessary variable initialisation " SF Markus Elfring
2017-09-02 20:47 ` SF Markus Elfring
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.