• Mauro Carvalho Chehab's avatar
    media: vidtv: add error checks · 3be80379
    Mauro Carvalho Chehab authored
    Currently, there are not checks if something gets bad during
    memory allocation: it will simply use NULL pointers and
    crash.
    
    Add error path at the logic which allocates memory for the
    MPEG-TS generator code, propagating the errors up to the
    vidtv_bridge. Now, if something wents bad, start_streaming
    will return an error that userspace can detect:
    
    	ERROR    DMX_SET_PES_FILTER failed (PID = 0x2000): 12 Cannot allocate memory
    
    and the driver doesn't crash.
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
    3be80379
vidtv_bridge.c 14.1 KB