diff options
author | Antti Palosaari <crope@iki.fi> | 2019-08-17 03:12:10 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-11-27 08:12:11 +0100 |
commit | 9c60cc797cf72e95bb39f32316e9f0e5f85435f9 (patch) | |
tree | c734432c4bdfc5a912895696ccc46e1a28aaa0d6 /drivers/media/usb/msi2500/msi2500.c | |
parent | media: usb: msi2500: Fix a possible null-pointer dereference in msi2500_stop_... (diff) | |
download | linux-9c60cc797cf72e95bb39f32316e9f0e5f85435f9.tar.xz linux-9c60cc797cf72e95bb39f32316e9f0e5f85435f9.zip |
media: msi2500: assign SPI bus number dynamically
SPI bus number must be assigned dynamically for each device, otherwise it
will crash when multiple devices are plugged to system.
Reported-and-tested-by: syzbot+c60ddb60b685777d9d59@syzkaller.appspotmail.com
Cc: stable@vger.kernel.org
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/usb/msi2500/msi2500.c')
-rw-r--r-- | drivers/media/usb/msi2500/msi2500.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/msi2500/msi2500.c b/drivers/media/usb/msi2500/msi2500.c index 269f3ef34bc9..63882a5248ae 100644 --- a/drivers/media/usb/msi2500/msi2500.c +++ b/drivers/media/usb/msi2500/msi2500.c @@ -1230,7 +1230,7 @@ static int msi2500_probe(struct usb_interface *intf, } dev->master = master; - master->bus_num = 0; + master->bus_num = -1; master->num_chipselect = 1; master->transfer_one_message = msi2500_transfer_one_message; spi_master_set_devdata(master, dev); |