From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx> Date: Sun, 17 Sep 2017 08:32:17 +0200 Replace the specification of data structures by variable references as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx> --- drivers/media/tuners/si2157.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/tuners/si2157.c b/drivers/media/tuners/si2157.c index aefa85718496..e3e2027a5027 100644 --- a/drivers/media/tuners/si2157.c +++ b/drivers/media/tuners/si2157.c @@ -457,7 +457,7 @@ static int si2157_probe(struct i2c_client *client, if (ret) goto err_kfree; - memcpy(&fe->ops.tuner_ops, &si2157_ops, sizeof(struct dvb_tuner_ops)); + memcpy(&fe->ops.tuner_ops, &si2157_ops, sizeof(si2157_ops)); fe->tuner_priv = client; #ifdef CONFIG_MEDIA_CONTROLLER @@ -514,7 +514,7 @@ static int si2157_remove(struct i2c_client *client) media_device_unregister_entity(&dev->ent); #endif - memset(&fe->ops.tuner_ops, 0, sizeof(struct dvb_tuner_ops)); + memset(&fe->ops.tuner_ops, 0, sizeof(fe->ops.tuner_ops)); fe->tuner_priv = NULL; kfree(dev); -- 2.14.1 -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html