On Thu, Jul 5, 2018 at 1:50 AM kbuild test robot <fengguang...@intel.com> wrote:
>
> From: kbuild test robot <fengguang...@intel.com>
>
> drivers/media/dvb-core/dvb_frontend.c:2396:18-24: ERROR: application of 
> sizeof to pointer
>
>  sizeof when applied to a pointer typed expression gives the size of
>  the pointer
>
> Generated by: scripts/coccinelle/misc/noderef.cocci
>
> Fixes: 07acff734698 ("media: dvb: represent min/max/step/tolerance freqs in 
> Hz")
> CC: Mauro Carvalho Chehab <mchehab+sams...@kernel.org>
> Signed-off-by: kbuild test robot <fengguang...@intel.com>
> ---
>
>  dvb_frontend.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/drivers/media/dvb-core/dvb_frontend.c
> +++ b/drivers/media/dvb-core/dvb_frontend.c
> @@ -2393,7 +2393,7 @@ static int dvb_frontend_handle_ioctl(str
>
>         case FE_GET_INFO: {
>                 struct dvb_frontend_info *info = parg;
> -               memset(info, 0, sizeof(info));
> +               memset(info, 0, sizeof(*info));
>
>                 dvb_frontend_get_frequency_limits(fe, &info->frequency_min, 
> &info->frequency_max);
>                 strcpy(info->name, fe->ops.info.name);

Nice catch!  (even for a robot)  I think we'll find more of these
sprinkled throughout the tree.

Reviewed-by: Michael Ira Krufky <mkru...@linuxtv.org>

Reply via email to