summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-frontends/mb86a20s.c
diff options
context:
space:
mode:
authorMarkus Elfring2017-08-28 11:55:16 +0200
committerMauro Carvalho Chehab2017-09-23 14:20:57 +0200
commit2d3da59ff163b2aa805de0fc65ba933a735b00cd (patch)
tree4c370d1bf357c25d8941627ed8968ab295f1f8ee /drivers/media/dvb-frontends/mb86a20s.c
parentmedia: drivers: delete unnecessary variable initialisations (diff)
downloadkernel-qcow2-linux-2d3da59ff163b2aa805de0fc65ba933a735b00cd.tar.gz
kernel-qcow2-linux-2d3da59ff163b2aa805de0fc65ba933a735b00cd.tar.xz
kernel-qcow2-linux-2d3da59ff163b2aa805de0fc65ba933a735b00cd.zip
media: drivers: improve a size determination
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. [mchehab@s-opensoure.com: merge similar patches into one] Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Diffstat (limited to 'drivers/media/dvb-frontends/mb86a20s.c')
-rw-r--r--drivers/media/dvb-frontends/mb86a20s.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/dvb-frontends/mb86a20s.c b/drivers/media/dvb-frontends/mb86a20s.c
index 340984100aec..ba7a433dd424 100644
--- a/drivers/media/dvb-frontends/mb86a20s.c
+++ b/drivers/media/dvb-frontends/mb86a20s.c
@@ -2071,7 +2071,7 @@ struct dvb_frontend *mb86a20s_attach(const struct mb86a20s_config *config,
dev_dbg(&i2c->dev, "%s called.\n", __func__);
/* allocate memory for the internal state */
- state = kzalloc(sizeof(struct mb86a20s_state), GFP_KERNEL);
+ state = kzalloc(sizeof(*state), GFP_KERNEL);
if (!state)
goto error;