Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752923AbaLUWFR (ORCPT ); Sun, 21 Dec 2014 17:05:17 -0500 Received: from mail-wg0-f41.google.com ([74.125.82.41]:33208 "EHLO mail-wg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751521AbaLUWFQ (ORCPT ); Sun, 21 Dec 2014 17:05:16 -0500 From: Rickard Strandqvist To: Oleg Drokin , Andreas Dilger Cc: Rickard Strandqvist , Greg Kroah-Hartman , Lai Siyao , Peng Tao , Julia Lawall , Greg Donald , Al Viro , "John L. Hammond" , Brian Behlendorf , HPDD-discuss@ml01.01.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging: lustre: lustre: llite: llite_lib.c: Removes unnecessary NULL check Date: Sun, 21 Dec 2014 23:08:00 +0100 Message-Id: <1419199680-13390-1-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Mailer: git-send-email 1.7.10.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Removes same unnecessary NULL check. Signed-off-by: Rickard Strandqvist --- drivers/staging/lustre/lustre/llite/llite_lib.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c index 7b6b9e2..435e1ad 100644 --- a/drivers/staging/lustre/lustre/llite/llite_lib.c +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c @@ -591,10 +591,8 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, get_uuid2fsid(uuid->uuid, strlen(uuid->uuid), &sbi->ll_fsid); } - if (data != NULL) - OBD_FREE_PTR(data); - if (osfs != NULL) - OBD_FREE_PTR(osfs); + OBD_FREE_PTR(data); + OBD_FREE_PTR(osfs); return err; out_root: @@ -612,10 +610,8 @@ out_md: obd_disconnect(sbi->ll_md_exp); sbi->ll_md_exp = NULL; out: - if (data != NULL) - OBD_FREE_PTR(data); - if (osfs != NULL) - OBD_FREE_PTR(osfs); + OBD_FREE_PTR(data); + OBD_FREE_PTR(osfs); lprocfs_unregister_mountpoint(sbi); return err; } -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/