Skip to content

Commit 7730b2f

Browse files
palosaarigregkh
authored andcommitted
media: msi2500: assign SPI bus number dynamically
commit 9c60cc7 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent f5d4e47 commit 7730b2f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/media/usb/msi2500/msi2500.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1230,7 +1230,7 @@ static int msi2500_probe(struct usb_interface *intf,
12301230
}
12311231

12321232
dev->master = master;
1233-
master->bus_num = 0;
1233+
master->bus_num = -1;
12341234
master->num_chipselect = 1;
12351235
master->transfer_one_message = msi2500_transfer_one_message;
12361236
spi_master_set_devdata(master, dev);

0 commit comments

Comments
 (0)