Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1732764
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 7/9] [media] tm6000: Improve a size determination in dvb_init() |
| Date | 2017-09-15 10:00 +0200 |
| Message-ID | <upTHA-8eD-15@gated-at.bofh.it> (permalink) |
| References | <upTxT-8aA-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Markus Elfring <elfring@users.sourceforge.net> Date: Fri, 15 Sep 2017 07:33:24 +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/usb/tm6000/tm6000-dvb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/tm6000/tm6000-dvb.c b/drivers/media/usb/tm6000/tm6000-dvb.c index 2bc584f75f87..855874134fcf 100644 --- a/drivers/media/usb/tm6000/tm6000-dvb.c +++ b/drivers/media/usb/tm6000/tm6000-dvb.c @@ -398,7 +398,7 @@ static int dvb_init(struct tm6000_core *dev) return 0; } - dvb = kzalloc(sizeof(struct tm6000_dvb), GFP_KERNEL); + dvb = kzalloc(sizeof(*dvb), GFP_KERNEL); if (!dvb) return -ENOMEM; -- 2.14.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/9] [media] TM6000: Adjustments for some function implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2017-09-15 09:50 +0200 [PATCH 2/9] [media] tm6000: Adjust seven checks for null pointers SF Markus Elfring <elfring@users.sourceforge.net> - 2017-09-15 10:00 +0200 [PATCH 4/9] [media] tm6000: One function call less in tm6000_usb_probe() after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2017-09-15 10:00 +0200 [PATCH 3/9] [media] tm6000: Use common error handling code in tm6000_usb_probe() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-09-15 10:00 +0200 [PATCH 8/9] [media] tm6000: Use common error handling code in tm6000_start_stream() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-09-15 10:00 +0200 [PATCH 7/9] [media] tm6000: Improve a size determination in dvb_init() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-09-15 10:00 +0200 [PATCH 6/9] [media] tm6000: Use common error handling code in tm6000_cards_setup() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-09-15 10:00 +0200 [PATCH 5/9] [media] tm6000: Delete an unnecessary variable initialisation in tm6000_usb_probe() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-09-15 10:00 +0200 [PATCH 9/9] [media] tm6000: Use common error handling code in tm6000_prepare_isoc() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-09-15 10:10 +0200
csiph-web