Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'tty-5.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty/serial driver fix from Greg KH:
"Here is a single tty/serial driver fix for 5.4-rc5 that resolves a
reported issue.

It has been in linux-next for a while with no problems"

* tag 'tty-5.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
8250-men-mcb: fix error checking when get_num_ports returns -ENODEV

+4 -4
+4 -4
drivers/tty/serial/8250/8250_men_mcb.c
··· 72 72 { 73 73 struct serial_8250_men_mcb_data *data; 74 74 struct resource *mem; 75 - unsigned int num_ports; 76 - unsigned int i; 75 + int num_ports; 76 + int i; 77 77 void __iomem *membase; 78 78 79 79 mem = mcb_get_resource(mdev, IORESOURCE_MEM); ··· 88 88 dev_dbg(&mdev->dev, "found a 16z%03u with %u ports\n", 89 89 mdev->id, num_ports); 90 90 91 - if (num_ports == 0 || num_ports > 4) { 91 + if (num_ports <= 0 || num_ports > 4) { 92 92 dev_err(&mdev->dev, "unexpected number of ports: %u\n", 93 93 num_ports); 94 94 return -ENODEV; ··· 133 133 134 134 static void serial_8250_men_mcb_remove(struct mcb_device *mdev) 135 135 { 136 - unsigned int num_ports, i; 136 + int num_ports, i; 137 137 struct serial_8250_men_mcb_data *data = mcb_get_drvdata(mdev); 138 138 139 139 if (!data)