From: Jiri Slaby <[email protected]> Stanse found that in gp8psk_load_bcm4500fw there is missing a check for return value of kmalloc. Add one and bail out appropriatelly.
Signed-off-by: Jiri Slaby <[email protected]> Cc: Alan Nisota <[email protected]> Cc: Patrick Boettcher <[email protected]> Cc: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Andrew Morton <[email protected]> --- drivers/media/dvb/dvb-usb/gp8psk.c | 4 ++++ 1 file changed, 4 insertions(+) diff -puN drivers/media/dvb/dvb-usb/gp8psk.c~dvb-usb-gp8psk-fix-potential-null-derefernce drivers/media/dvb/dvb-usb/gp8psk.c --- a/drivers/media/dvb/dvb-usb/gp8psk.c~dvb-usb-gp8psk-fix-potential-null-derefernce +++ a/drivers/media/dvb/dvb-usb/gp8psk.c @@ -105,6 +105,10 @@ static int gp8psk_load_bcm4500fw(struct ptr = fw->data; buf = kmalloc(64, GFP_KERNEL | GFP_DMA); + if (!buf) { + ret = -ENOMEM; + goto out_rel_fw; + } while (ptr[0] != 0xff) { u16 buflen = ptr[0] + 4; _ -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
