X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=drivers%2Fblock%2Ffloppy.c;h=3587cb434371f10a3219b9405a1dc6225cff93c9;hb=5335a40be6867eff986a31bcd8fc82a5cb1e16bb;hp=3f1b38276e96e123e6ec772cb08a605dd8d08032;hpb=7f3af60e5a444b287d740a84998a8f480645dadf;p=linux-2.6-omap-h63xx.git diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 3f1b38276e9..3587cb43437 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -297,17 +297,17 @@ static int initialising = 1; #define DRS (&drive_state[current_drive]) #define DRWE (&write_errors[current_drive]) #define FDCS (&fdc_state[fdc]) -#define CLEARF(x) (clear_bit(x##_BIT, &DRS->flags)) -#define SETF(x) (set_bit(x##_BIT, &DRS->flags)) -#define TESTF(x) (test_bit(x##_BIT, &DRS->flags)) +#define CLEARF(x) clear_bit(x##_BIT, &DRS->flags) +#define SETF(x) set_bit(x##_BIT, &DRS->flags) +#define TESTF(x) test_bit(x##_BIT, &DRS->flags) #define UDP (&drive_params[drive]) #define UDRS (&drive_state[drive]) #define UDRWE (&write_errors[drive]) #define UFDCS (&fdc_state[FDC(drive)]) -#define UCLEARF(x) (clear_bit(x##_BIT, &UDRS->flags)) -#define USETF(x) (set_bit(x##_BIT, &UDRS->flags)) -#define UTESTF(x) (test_bit(x##_BIT, &UDRS->flags)) +#define UCLEARF(x) clear_bit(x##_BIT, &UDRS->flags) +#define USETF(x) set_bit(x##_BIT, &UDRS->flags) +#define UTESTF(x) test_bit(x##_BIT, &UDRS->flags) #define DPRINT(format, args...) printk(DEVICE_NAME "%d: " format, current_drive , ## args) @@ -4334,7 +4334,10 @@ static int __init floppy_init(void) if (err) goto out_flush_work; - device_create_file(&floppy_device[drive].dev,&dev_attr_cmos); + err = device_create_file(&floppy_device[drive].dev,&dev_attr_cmos); + if (err) + goto out_unreg_platform_dev; + /* to be cleaned up... */ disks[drive]->private_data = (void *)(long)drive; disks[drive]->queue = floppy_queue; @@ -4345,6 +4348,8 @@ static int __init floppy_init(void) return 0; +out_unreg_platform_dev: + platform_device_unregister(&floppy_device[drive]); out_flush_work: flush_scheduled_work(); if (usage_count)