#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) \
do { \
if ((x) >= (n)) \
{
int err;
- CHECK_RETURN(device_create_file(dev, &dev_attr_device_id));
- CHECK_RETURN(device_create_file(dev, &dev_attr_firmware_version));
- CHECK_RETURN(device_create_file(dev, &dev_attr_serial_number));
+ err = device_create_file(dev, &dev_attr_device_id);
+ if (err < 0)
+ 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;
}
line6_read_data(line6, 0x80c2, &toneport->firmware_version, 1);
if (toneport_has_led(toneport->type)) {
- CHECK_RETURN(device_create_file
- (&interface->dev, &dev_attr_led_red));
- CHECK_RETURN(device_create_file
- (&interface->dev, &dev_attr_led_green));
+ err = device_create_file(&interface->dev, &dev_attr_led_red);
+ if (err < 0)
+ return err;
+ err = device_create_file(&interface->dev, &dev_attr_led_green);
+ if (err < 0)
+ return err;
}
toneport_setup(toneport);