Showing error 1807

User: Jiri Slaby
Error type: Invalid Pointer Dereference
Error type description: A pointer which is invalid is being dereferenced
File location: drivers/media/video/cx18/cx18-mailbox.c
Line in file: 364
Project: Linux Kernel
Project version: 2.6.28
Tools: Smatch (1.59)
Entered: 2013-09-11 08:47:26 UTC


Source:

334                return cx18_vapi(cx, CX18_CPU_SET_SPATIAL_FILTER_TYPE, 3,
335                                s->handle, data[0], data[1]);
336        case CX2341X_ENC_SET_CORING_LEVELS:
337                return cx18_vapi(cx, CX18_CPU_SET_MEDIAN_CORING, 5,
338                                s->handle, data[0], data[1], data[2], data[3]);
339        }
340        CX18_WARN("Unknown cmd %x\n", cmd);
341        return 0;
342}
343
344int cx18_vapi_result(struct cx18 *cx, u32 data[MAX_MB_ARGUMENTS],
345                u32 cmd, int args, ...)
346{
347        va_list ap;
348        int i;
349
350        va_start(ap, args);
351        for (i = 0; i < args; i++)
352                data[i] = va_arg(ap, u32);
353        va_end(ap);
354        return cx18_api(cx, cmd, args, data);
355}
356
357int cx18_vapi(struct cx18 *cx, u32 cmd, int args, ...)
358{
359        u32 data[MAX_MB_ARGUMENTS];
360        va_list ap;
361        int i;
362
363        if (cx == NULL) {
364                CX18_ERR("cx == NULL (cmd=%x)\n", cmd);
365                return 0;
366        }
367        if (args > MAX_MB_ARGUMENTS) {
368                CX18_ERR("args too big (cmd=%x)\n", cmd);
369                args = MAX_MB_ARGUMENTS;
370        }
371        va_start(ap, args);
372        for (i = 0; i < args; i++)
373                data[i] = va_arg(ap, u32);
374        va_end(ap);
Show full sources