Message ID | 201004272111.o3RLBK9R019985@imap1.linux-foundation.org (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
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;