Skip to content

Commit

Permalink
media: msi2500: assign SPI bus number dynamically
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
palosaari authored and mchehab committed Nov 27, 2020
1 parent 3ec7fdc commit 9c60cc7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/usb/msi2500/msi2500.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9c60cc7

Please sign in to comment.