Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2910244imm; Mon, 13 Aug 2018 02:40:03 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzemkRjIWYvemUo/Z1CrqgPll7td7m/tm7iBoypb083TssT59wvHBxZGK+R3Bh/Kk1TpLhp X-Received: by 2002:a17:902:5582:: with SMTP id g2-v6mr16096368pli.328.1534153203809; Mon, 13 Aug 2018 02:40:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534153203; cv=none; d=google.com; s=arc-20160816; b=GFX86ozlxWMBr/53KD+IWbeENWkL43otNXGYekQO9qVjWXIe0hphM8tpuaO34Snui5 Mrnxos9hEjR+LxPCzfhyP7CEBnREM5Oz/CXMlEujnIPGh9RpjSCEHmMvO4vEmNQwQFaU D0NHDrbZI/c8v88Ce/MuZJVyKzmmr3A59H3pdfPT9MeJIqBSSQSF7jygyGXikWW5HVyZ bJuXohAqA7T6uMviQAFTPgKFxHYjGIrO4vRaAgDqqn5q2h5Gg5T7Dhir2lwy5P0sk+k4 gir1s5FhIlgS6jrUw9Fa093eGVLNakPILri0+rMmqDSbGVeV46yI0EzyNgKQGLMKQ6N5 AGmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=REukuXf0xkQhEPITAZH5ZGcVvOwga1utjzmu9MtDmyc=; b=dhyT7qphzL6zmz4JMcJgfpwM0MR4IGDDvTy+WSd/SKvhVjog7PclCMo+XRDMKgwxGU uftOJxKenpPOc9ygaQYgLLpW63CpLGwTWINrAsvompvmPn4Arr8yyx1YeYpgUf+7DrZZ tNaNc8jNCOzDYL/MnwHVPMccj0Y2K76vGnyVnfJLEE9b/wA1A/sDskPIFOn8nvEJZdX3 73GoPYSVFWW/OS+uWyDQdzJz7upAbMUSWQeL/6qdqEm6EVzyBv6SKev54yJIbuGGGArc LKIFnz0y5ApCl7pPXoZ0CTOinl4l+K/s+t0EFLEc4RtBzhiJCUbL5PokWrII6Tvzt6M5 1TrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vfVUCFNu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n19-v6si13918638pgd.408.2018.08.13.02.39.48; Mon, 13 Aug 2018 02:40:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vfVUCFNu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728816AbeHMMU1 (ORCPT + 99 others); Mon, 13 Aug 2018 08:20:27 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:39357 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728055AbeHMMU1 (ORCPT ); Mon, 13 Aug 2018 08:20:27 -0400 Received: by mail-pf1-f195.google.com with SMTP id j8-v6so7420885pff.6; Mon, 13 Aug 2018 02:39:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=REukuXf0xkQhEPITAZH5ZGcVvOwga1utjzmu9MtDmyc=; b=vfVUCFNupVJi8U0Qg5bvE3d8Gj08dn5ZIRcZqUIyJPeYZTKr6xSGV0VethFrVZnzbp iFpdGswnjjk0Ey5ad6Xb4uvy1MNkz9Ui+t3011fW7yADG37DigSLWh0V5QyBly1ecGJ9 H1J+2nGlrtE5L9ISr0eAs+NXeCxD6g/3rnRifXEOLZm8rrOotYHpLTazMM8aMi+Pew+2 EBOyCoF5UIB4pTLuANCnT0W5nH2cw5mlFNhl+eQC88QB5kafmoyMWd3MrlAnTgXxUVGw Citqe7jZHWaIF9wIuW7vOjuZ+HvLwgDMR548G76nG9cr9nyeU/PJGGfAKHAu7WVtkAXQ O0pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=REukuXf0xkQhEPITAZH5ZGcVvOwga1utjzmu9MtDmyc=; b=R9JU1nGhbFNTR/hkdhgM7pT6Y+AoUXTVMPZwFS/NhBG/Z0oVYG4n/NYCT3eQF/fM4d TQup3qsii9d7m+IkS2CF22+82GVyuM189p+pCK+daRgXsHWC4U+ma4K4VTKhx8TfOsU+ cMJFtHhDMvB4LJeZeNkbiFDq/0XXn7aQFWWZKrSh8jlf0MkvA/9XrIOQDuWY6JN+BKT6 Sa7V+ksZQn+RBu0HOzB/hDIqAVeQSEuYX2ZHxGekEbo1UsNymEvyz4mFVerSnWfupj8j qaJwzh8YzNf56/xHITEbtGmnvlRbgWUY/U8nafui59zPsQe3xD2aKUg6hgiIxuv/y+Xo VTvw== X-Gm-Message-State: AOUpUlGPEjVN65m/7/55GLBzt1nVAXM9Jm5mnReNu/mTAebViakkuZYJ QvNgG1baweTK2nlgf3RlzZM= X-Received: by 2002:a63:2c8e:: with SMTP id s136-v6mr16021830pgs.390.1534153139826; Mon, 13 Aug 2018 02:38:59 -0700 (PDT) Received: from linux-zmni.apac.novell.com ([45.122.156.254]) by smtp.gmail.com with ESMTPSA id l79-v6sm39323128pfb.111.2018.08.13.02.38.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 13 Aug 2018 02:38:59 -0700 (PDT) From: Sean Fu To: colyli@suse.de Cc: kent.overstreet@gmail.com, linux-bcache@vger.kernel.org, linux-kernel@vger.kernel.org, Sean Fu Subject: [PATCH] md/bcache: Remove NULL check. Date: Mon, 13 Aug 2018 17:38:49 +0800 Message-Id: <1534153129-24869-1-git-send-email-fxinrong@gmail.com> X-Mailer: git-send-email 2.6.2 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove unnessesary NULL check before kmem_cache_destroy() in drivers/md/bcache/request.c Signed-off-by: Sean Fu --- drivers/md/bcache/request.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c index ae67f5f..0ddee35 100644 --- a/drivers/md/bcache/request.c +++ b/drivers/md/bcache/request.c @@ -1306,8 +1306,7 @@ void bch_flash_dev_request_init(struct bcache_device *d) void bch_request_exit(void) { - if (bch_search_cache) - kmem_cache_destroy(bch_search_cache); + kmem_cache_destroy(bch_search_cache); } int __init bch_request_init(void) -- 2.6.2