Fixes a crash when a virtio-serial port is added without a name to it.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJUXFFdAAoJEB6aO1+FQIO2ztkQAIIJZS56qWJG+m6ULRMzzqNr uS1BE1kNuJydPHdAPwR/MKkBG91YZqwU3qoX+Tv5ZrIRbSmeUHE2afULUKJL80e1 Lk5mGDlk9wrMbUSX+43G/nj8mqmzTzTHh873iLnTZa1g5yjFyzNqQ0wnFjs/G17N bFVcqvclxKHYs6iMOaXLdxNJZeAdls7A6Xze4jbHRdZhFhHiEWV8gt3Muox01g0I OiHqeaTaT74RAlvXINQFZqyJ53LHVVpKvQ5oOUL8KrC4m6x5IDxkQ24Gnv/SOrBq JDbuIv/mvFwd8XPHznI3xl55SIQGSs3fycUsiZEpc21FWytm6bs5PJNProX8aPZt YUPswy0+A6c+aaN9HRUVigGjefdduGMRcLsxSASRJUbHHzHAZlQGl4vt2KxWb6i9 +pM/KMTT+3j2dnH50+wyg//8IVsq3kNQblfSarIGLbHxdcT650QyK6KriXVvjMgp rO7MOw/tT8nl+bTr/iOTkiKj7RBE6/lLzMb6Gn5BUBqUdaamyVqTZUInighNuYpK 0pDZpm6fKp/xOvNRYio1dWG8/ZWY+xuq7knV0sXaJrr7A38HRVV1FaUNbHeqQvNt 6NSTYtnnWW4sbZPR3A06vPAoI1SM9jZMXgdAc0aMNe0QoJDPxuoGIzeC8z1EHXMl mTOwam/FjlPQ/DrX5APZ =x635 -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/amit/tags/vser-2.2.0-queue-2' into staging Fixes a crash when a virtio-serial port is added without a name to it. # gpg: Signature made Fri 07 Nov 2014 04:58:05 GMT using RSA key ID 854083B6 # gpg: Good signature from "Amit Shah <amit@amitshah.net>" # gpg: aka "Amit Shah <amit@kernel.org>" # gpg: aka "Amit Shah <amitshah@gmx.net>" * remotes/amit/tags/vser-2.2.0-queue-2: virtio-serial: avoid crash when port has no name Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
7b4b7c5fc7
@ -871,7 +871,7 @@ static void virtser_port_device_realize(DeviceState *dev, Error **errp)
|
||||
return;
|
||||
}
|
||||
|
||||
if (find_port_by_name(port->name)) {
|
||||
if (port->name != NULL && find_port_by_name(port->name)) {
|
||||
error_setg(errp, "virtio-serial-bus: A port already exists by name %s",
|
||||
port->name);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user