* [PATCH 0/2] [media] FC0012: Adjustments for fc0012_attach()
@ 2017-09-16 16:16 SF Markus Elfring
2017-09-16 16:18 ` [PATCH 1/2] [media] fc0012: Delete an error message for a failed memory allocation in fc0012_attach() SF Markus Elfring
2017-09-16 16:19 ` [PATCH 2/2] [media] fc0012: Improve a size determination " SF Markus Elfring
0 siblings, 2 replies; 3+ messages in thread
From: SF Markus Elfring @ 2017-09-16 16:16 UTC (permalink / raw)
To: linux-media, Colin Ian King, Hans Verkuil, Mauro Carvalho Chehab,
Max Kellermann, Sakari Ailus
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 16 Sep 2017 18:03:21 +0200
Two update suggestions were taken into account
from static source code analysis.
Markus Elfring (2):
Delete an error message for a failed memory allocation
Improve a size determination
drivers/media/tuners/fc0012.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--
2.14.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] [media] fc0012: Delete an error message for a failed memory allocation in fc0012_attach()
2017-09-16 16:16 [PATCH 0/2] [media] FC0012: Adjustments for fc0012_attach() SF Markus Elfring
@ 2017-09-16 16:18 ` SF Markus Elfring
2017-09-16 16:19 ` [PATCH 2/2] [media] fc0012: Improve a size determination " SF Markus Elfring
1 sibling, 0 replies; 3+ messages in thread
From: SF Markus Elfring @ 2017-09-16 16:18 UTC (permalink / raw)
To: linux-media, Colin Ian King, Hans Verkuil, Mauro Carvalho Chehab,
Max Kellermann, Sakari Ailus
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 16 Sep 2017 17:47:52 +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/tuners/fc0012.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/media/tuners/fc0012.c b/drivers/media/tuners/fc0012.c
index 625ac6f51c39..7126dd1d5151 100644
--- a/drivers/media/tuners/fc0012.c
+++ b/drivers/media/tuners/fc0012.c
@@ -449,6 +449,5 @@ struct dvb_frontend *fc0012_attach(struct dvb_frontend *fe,
if (!priv) {
ret = -ENOMEM;
- dev_err(&i2c->dev, "%s: kzalloc() failed\n", KBUILD_MODNAME);
goto err;
}
--
2.14.1
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH 2/2] [media] fc0012: Improve a size determination in fc0012_attach()
2017-09-16 16:16 [PATCH 0/2] [media] FC0012: Adjustments for fc0012_attach() SF Markus Elfring
2017-09-16 16:18 ` [PATCH 1/2] [media] fc0012: Delete an error message for a failed memory allocation in fc0012_attach() SF Markus Elfring
@ 2017-09-16 16:19 ` SF Markus Elfring
1 sibling, 0 replies; 3+ messages in thread
From: SF Markus Elfring @ 2017-09-16 16:19 UTC (permalink / raw)
To: linux-media, Colin Ian King, Hans Verkuil, Mauro Carvalho Chehab,
Max Kellermann, Sakari Ailus
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 16 Sep 2017 17:55:27 +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/tuners/fc0012.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/tuners/fc0012.c b/drivers/media/tuners/fc0012.c
index 7126dd1d5151..c008513bd64a 100644
--- a/drivers/media/tuners/fc0012.c
+++ b/drivers/media/tuners/fc0012.c
@@ -445,5 +445,5 @@ struct dvb_frontend *fc0012_attach(struct dvb_frontend *fe,
if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 1);
- priv = kzalloc(sizeof(struct fc0012_priv), GFP_KERNEL);
+ priv = kzalloc(sizeof(*priv), GFP_KERNEL);
if (!priv) {
--
2.14.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-09-16 16:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-16 16:16 [PATCH 0/2] [media] FC0012: Adjustments for fc0012_attach() SF Markus Elfring
2017-09-16 16:18 ` [PATCH 1/2] [media] fc0012: Delete an error message for a failed memory allocation in fc0012_attach() SF Markus Elfring
2017-09-16 16:19 ` [PATCH 2/2] [media] fc0012: Improve a size determination " SF Markus Elfring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®