Re: [PATCH 01/15] z2ram: add error handling support for add_disk()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 01, 2021 at 03:41:47PM +0200, Geert Uytterhoeven wrote:
> > --- a/drivers/block/z2ram.c
> > +++ b/drivers/block/z2ram.c
> > @@ -333,8 +334,10 @@ static int z2ram_register_disk(int minor)
> >                 sprintf(disk->disk_name, "z2ram");
> >
> >         z2ram_gendisk[minor] = disk;
> > -       add_disk(disk);
> > -       return 0;
> > +       err = add_disk(disk);
> > +       if (err)
> > +               blk_cleaup_disk(disk);
> 
> blk_cleanup_disk()?

Fixed thanks.

  Luis



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux