ALSA: usb-audio: Follow standard coding style
Avoid if ((err = ...) style and expand to multiple lines instead. No change in the end result, but just the beautification. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
@@ -163,10 +163,11 @@ static int init_pitch_v1(struct snd_usb_audio *chip, int iface,
|
||||
ep = get_endpoint(alts, 0)->bEndpointAddress;
|
||||
|
||||
data[0] = 1;
|
||||
if ((err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), UAC_SET_CUR,
|
||||
USB_TYPE_CLASS|USB_RECIP_ENDPOINT|USB_DIR_OUT,
|
||||
UAC_EP_CS_ATTR_PITCH_CONTROL << 8, ep,
|
||||
data, sizeof(data))) < 0) {
|
||||
err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), UAC_SET_CUR,
|
||||
USB_TYPE_CLASS|USB_RECIP_ENDPOINT|USB_DIR_OUT,
|
||||
UAC_EP_CS_ATTR_PITCH_CONTROL << 8, ep,
|
||||
data, sizeof(data));
|
||||
if (err < 0) {
|
||||
usb_audio_err(chip, "%d:%d: cannot set enable PITCH\n",
|
||||
iface, ep);
|
||||
return err;
|
||||
@@ -184,10 +185,11 @@ static int init_pitch_v2(struct snd_usb_audio *chip, int iface,
|
||||
int err;
|
||||
|
||||
data[0] = 1;
|
||||
if ((err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), UAC2_CS_CUR,
|
||||
USB_TYPE_CLASS | USB_RECIP_ENDPOINT | USB_DIR_OUT,
|
||||
UAC2_EP_CS_PITCH << 8, 0,
|
||||
data, sizeof(data))) < 0) {
|
||||
err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), UAC2_CS_CUR,
|
||||
USB_TYPE_CLASS | USB_RECIP_ENDPOINT | USB_DIR_OUT,
|
||||
UAC2_EP_CS_PITCH << 8, 0,
|
||||
data, sizeof(data));
|
||||
if (err < 0) {
|
||||
usb_audio_err(chip, "%d:%d: cannot set enable PITCH (v2)\n",
|
||||
iface, fmt->altsetting);
|
||||
return err;
|
||||
|
Reference in New Issue
Block a user