Hi Sean, I hope this one will be okay. 2017-11-11 19:01 GMT+01:00 Sean Young <sean@xxxxxxxx>: > Hi Laurent, > > On Sat, Nov 11, 2017 at 06:53:54PM +0100, Laurent Caumont wrote: >> Hi Sean, >> >> I just realized that files in media_build/linux/driver are not >> associate with a git repository. They are retrieved by the build >> command. >> So, I cloned the linux-stable repository to generate the patch. > > Great, thank you. > > We need a Signed-off-by: line to accept your patch, see part 11 of > > https://www.kernel.org/doc/html/latest/process/submitting-patches.html > > Thanks, > > Sean
From bf48cb8988a0335038e8df1a40f1d1b2cf4225d5 Mon Sep 17 00:00:00 2001 From: Laurent Caumont <lcaumont2@xxxxxxxxx> Date: Sat, 11 Nov 2017 18:44:46 +0100 Subject: [PATCH] media: dvb: i2c transfers over usb - use kmalloc instead stack Signed-off-by: Laurent Caumont <lcaumont2@xxxxxxxxx> --- drivers/media/usb/dvb-usb/dibusb-common.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/dvb-usb/dibusb-common.c b/drivers/media/usb/dvb-usb/dibusb-common.c index 8207e690..e1c31381 100644 --- a/drivers/media/usb/dvb-usb/dibusb-common.c +++ b/drivers/media/usb/dvb-usb/dibusb-common.c @@ -223,8 +223,26 @@ EXPORT_SYMBOL(dibusb_i2c_algo); int dibusb_read_eeprom_byte(struct dvb_usb_device *d, u8 offs, u8 *val) { - u8 wbuf[1] = { offs }; - return dibusb_i2c_msg(d, 0x50, wbuf, 1, val, 1); + u8 *wbuf; + u8 *rbuf; + int rc; + + rbuf = kmalloc(1, GFP_KERNEL); + if (!rbuf) + return -ENOMEM; + + wbuf = kmalloc(1, GFP_KERNEL); + if (!wbuf) + return -ENOMEM; + + *wbuf = offs; + + rc = dibusb_i2c_msg(d, 0x50, wbuf, 1, rbuf, 1); + kfree(wbuf); + *val = *rbuf; + kfree(rbuf); + + return rc; } EXPORT_SYMBOL(dibusb_read_eeprom_byte); -- 2.14.1