From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-media@vger.kernel.org, Hans Verkuil <hverkuil@xs4all.nl>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 6/7] [media] Hexium Orion: Improve a size determination in hexium_probe()
Date: Sun, 3 Sep 2017 22:36:15 +0200 [thread overview]
Message-ID: <f98489bb-88c0-b16d-8f0e-31212e243634@users.sourceforge.net> (raw)
In-Reply-To: <170abf7f-3b62-a37c-966a-8b574acae230@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 3 Sep 2017 20:00:17 +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/saa7146/hexium_orion.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/pci/saa7146/hexium_orion.c b/drivers/media/pci/saa7146/hexium_orion.c
index 72fac6a8494a..187e072a3697 100644
--- a/drivers/media/pci/saa7146/hexium_orion.c
+++ b/drivers/media/pci/saa7146/hexium_orion.c
@@ -219,5 +219,5 @@ static int hexium_probe(struct saa7146_dev *dev)
return -EFAULT;
}
- hexium = kzalloc(sizeof(struct hexium), GFP_KERNEL);
+ hexium = kzalloc(sizeof(*hexium), GFP_KERNEL);
if (!hexium)
--
2.14.1
next prev parent reply other threads:[~2017-09-03 20:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-03 20:30 [PATCH 0/7] [media] SAA71..: Adjustments for four function implementations SF Markus Elfring
2017-09-03 20:31 ` [PATCH 1/7] [media] saa7164: Delete an error message for a failed memory allocation in saa7164_buffer_alloc() SF Markus Elfring
2017-09-03 20:32 ` [PATCH 2/7] [media] saa7164: Improve a size determination in two functions SF Markus Elfring
2017-09-03 20:33 ` [PATCH 3/7] [media] Hexium Gemini: Delete an error message for a failed memory allocation in hexium_attach() SF Markus Elfring
2017-09-03 20:34 ` [PATCH 4/7] [media] Hexium Gemini: Improve a size determination " SF Markus Elfring
2017-09-03 20:35 ` [PATCH 5/7] [media] Hexium Orion: Delete an error message for a failed memory allocation in hexium_probe() SF Markus Elfring
2017-09-03 20:36 ` SF Markus Elfring [this message]
2017-09-03 20:37 ` [PATCH 7/7] [media] Hexium Orion: Adjust one function call together with a variable assignment SF Markus Elfring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f98489bb-88c0-b16d-8f0e-31212e243634@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=hverkuil@xs4all.nl \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®