Commit b2a3b023 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: line6: Remove CHECK_RETURN macro

Such a macro doesn't improve readability.
Tested-by: default avatarChris Rorvick <chris@rorvick.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 10e3a023
...@@ -48,13 +48,6 @@ ...@@ -48,13 +48,6 @@
#define LINE6_CHANNEL_MASK 0x0f #define LINE6_CHANNEL_MASK 0x0f
#define CHECK_RETURN(x) \
do { \
err = x; \
if (err < 0) \
return err; \
} while (0)
#define CHECK_STARTUP_PROGRESS(x, n) \ #define CHECK_STARTUP_PROGRESS(x, n) \
do { \ do { \
if ((x) >= (n)) \ if ((x) >= (n)) \
......
...@@ -429,9 +429,15 @@ static int pod_create_files2(struct device *dev) ...@@ -429,9 +429,15 @@ static int pod_create_files2(struct device *dev)
{ {
int err; int err;
CHECK_RETURN(device_create_file(dev, &dev_attr_device_id)); err = device_create_file(dev, &dev_attr_device_id);
CHECK_RETURN(device_create_file(dev, &dev_attr_firmware_version)); if (err < 0)
CHECK_RETURN(device_create_file(dev, &dev_attr_serial_number)); return err;
err = device_create_file(dev, &dev_attr_firmware_version);
if (err < 0)
return err;
err = device_create_file(dev, &dev_attr_serial_number);
if (err < 0)
return err;
return 0; return 0;
} }
......
...@@ -431,10 +431,12 @@ static int toneport_init(struct usb_interface *interface, ...@@ -431,10 +431,12 @@ static int toneport_init(struct usb_interface *interface,
line6_read_data(line6, 0x80c2, &toneport->firmware_version, 1); line6_read_data(line6, 0x80c2, &toneport->firmware_version, 1);
if (toneport_has_led(toneport->type)) { if (toneport_has_led(toneport->type)) {
CHECK_RETURN(device_create_file err = device_create_file(&interface->dev, &dev_attr_led_red);
(&interface->dev, &dev_attr_led_red)); if (err < 0)
CHECK_RETURN(device_create_file return err;
(&interface->dev, &dev_attr_led_green)); err = device_create_file(&interface->dev, &dev_attr_led_green);
if (err < 0)
return err;
} }
toneport_setup(toneport); toneport_setup(toneport);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment