• Mauro Carvalho Chehab's avatar
    [media] horus3a: don't use variable length arrays · 4aabd916
    Mauro Carvalho Chehab authored
    The Linux stack is short; we need to be able to count the number
    of bytes used at stack on each function. So, we don't like to
    use variable-length arrays, as complained by smatch:
    	drivers/media/dvb-frontends/horus3a.c:57:19: warning: Variable length array is used.
    
    The max usecase of the driver seems to be 5 bytes + 1 for the
    register.
    
    So, let's be safe and allocate 6 bytes for the write buffer.
    This should be enough to cover all cases. If not, let's print
    an error message.
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
    4aabd916
horus3a.c 10.4 KB