dm cache: fix missing ERR_PTR returns and handling
authorJoe Thornber <ejt@redhat.com>
Wed, 28 Jan 2015 12:07:46 +0000 (12:07 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Feb 2015 06:35:37 +0000 (22:35 -0800)
commit4d298d4d3d0faee7cdcc853dad3c5fedefbe8e9b
treef3fde0805e17d9dc5063adc151922a56e197bdab
parentb2c38d8fcf5648129ebb28016f619cccc23d6368
dm cache: fix missing ERR_PTR returns and handling

commit 766a78882ddf79b162243649d7dfdbac1fb6fb88 upstream.

Commit 9b1cc9f251 ("dm cache: share cache-metadata object across
inactive and active DM tables") mistakenly ignored the use of ERR_PTR
returns.  Restore missing IS_ERR checks and ERR_PTR returns where
appropriate.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-cache-metadata.c