diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-12-06 15:27:17 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-12-06 15:27:17 +0100 |
commit | e8cd29b774ddd28bfe6d693c82241e294dc91e09 (patch) | |
tree | c8f904220eab7c50771558642b6c6d9240fb5368 /drivers/block/null_blk.c | |
parent | staging: dgnc: add identifiers to function parameters (diff) | |
parent | Merge tag 'staging-4.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git... (diff) | |
download | linux-e8cd29b774ddd28bfe6d693c82241e294dc91e09.tar.xz linux-e8cd29b774ddd28bfe6d693c82241e294dc91e09.zip |
Merge Linus's staging merge point into staging-next
This resolves the merge issue pointed out by Stephen in
drivers/iio/adc/meson_saradc.c.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/block/null_blk.c')
-rw-r--r-- | drivers/block/null_blk.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c index c61960deb74a..ccb9975a97fa 100644 --- a/drivers/block/null_blk.c +++ b/drivers/block/null_blk.c @@ -471,7 +471,6 @@ static void nullb_device_release(struct config_item *item) { struct nullb_device *dev = to_nullb_device(item); - badblocks_exit(&dev->badblocks); null_free_device_storage(dev, false); null_free_dev(dev); } @@ -582,6 +581,10 @@ static struct nullb_device *null_alloc_dev(void) static void null_free_dev(struct nullb_device *dev) { + if (!dev) + return; + + badblocks_exit(&dev->badblocks); kfree(dev); } |