diff options
author | Oleg Drokin <green@linuxhacker.ru> | 2016-02-16 00:46:57 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-20 14:33:11 -0800 |
commit | 7f1ae4c066d52d074822387b7d6702b8f0a31e90 (patch) | |
tree | 5c1f889e6d362accf6fb8d8f42b2c0d88690a881 /drivers/staging/lustre/lustre/osc/osc_dev.c | |
parent | 7ae59edacf11ea8ec651cf6de2bf7d66a0013257 (diff) | |
download | op-kernel-dev-7f1ae4c066d52d074822387b7d6702b8f0a31e90.zip op-kernel-dev-7f1ae4c066d52d074822387b7d6702b8f0a31e90.tar.gz |
staging/lustre/osc: Adjust NULL comparison codestyle
All instances of "x == NULL" are changed to "!x" and
"x != NULL" to "x"
Also remove some redundant assertions.
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/osc/osc_dev.c')
-rw-r--r-- | drivers/staging/lustre/lustre/osc/osc_dev.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/lustre/lustre/osc/osc_dev.c b/drivers/staging/lustre/lustre/osc/osc_dev.c index 7078cc5..67cb6e4 100644 --- a/drivers/staging/lustre/lustre/osc/osc_dev.c +++ b/drivers/staging/lustre/lustre/osc/osc_dev.c @@ -123,7 +123,7 @@ static void *osc_key_init(const struct lu_context *ctx, struct osc_thread_info *info; info = kmem_cache_alloc(osc_thread_kmem, GFP_NOFS | __GFP_ZERO); - if (info == NULL) + if (!info) info = ERR_PTR(-ENOMEM); return info; } @@ -148,7 +148,7 @@ static void *osc_session_init(const struct lu_context *ctx, struct osc_session *info; info = kmem_cache_alloc(osc_session_kmem, GFP_NOFS | __GFP_ZERO); - if (info == NULL) + if (!info) info = ERR_PTR(-ENOMEM); return info; } @@ -228,7 +228,7 @@ static struct lu_device *osc_device_alloc(const struct lu_env *env, /* Setup OSC OBD */ obd = class_name2obd(lustre_cfg_string(cfg, 0)); - LASSERT(obd != NULL); + LASSERT(obd); rc = osc_setup(obd, cfg); if (rc) { osc_device_free(env, d); |