ALSA: seq: oss: Fix error check at system port creation
authorTakashi Iwai <tiwai@suse.de>
Thu, 17 Jun 2021 13:47:42 +0000 (15:47 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 17 Jun 2021 14:02:26 +0000 (16:02 +0200)
commitc485f7e9863c4483f5d2e9a8da622b52d110d866
tree3ca7bb82b8302a44066b7d505a5d8dd4d01a765d
parentfc36ef80ca2c68b2c9df06178048f08280e4334f
ALSA: seq: oss: Fix error check at system port creation

The system port creation in ALSA OSS sequencer was wrongly checked
against to the port number that can be never negative.  The error code
should be checked rather against the ioctl call.

This patch corrects the error check.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20210617134742.6321-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/seq/oss/seq_oss_init.c