Re: [PATCH] media: dvb: fix noderef.cocci warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 5, 2018 at 1:50 AM kbuild test robot <fengguang.wu@xxxxxxxxx> wrote:
>
> From: kbuild test robot <fengguang.wu@xxxxxxxxx>
>
> 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+samsung@xxxxxxxxxx>
> Signed-off-by: kbuild test robot <fengguang.wu@xxxxxxxxx>
> ---
>
>  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 <mkrufky@xxxxxxxxxxx>



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux