Re: [PATCH] axonram: Fix gendisk handling

2017-03-08 Thread Jens Axboe
On 03/08/2017 06:56 AM, Jan Kara wrote: > It is invalid to call del_gendisk() when disk->queue is NULL. Fix error > handling in axon_ram_probe() to avoid doing that. > > Also del_gendisk() does not drop a reference to gendisk allocated by > alloc_disk(). That has to be done by put_disk(). Add that

[PATCH] axonram: Fix gendisk handling

2017-03-08 Thread Jan Kara
It is invalid to call del_gendisk() when disk->queue is NULL. Fix error handling in axon_ram_probe() to avoid doing that. Also del_gendisk() does not drop a reference to gendisk allocated by alloc_disk(). That has to be done by put_disk(). Add that call where needed. Reported-by: Dan Carpenter S