From patchwork Wed Sep 9 22:33:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Klimov X-Patchwork-Id: 53354 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by patches.linaro.org (Postfix) with ESMTPS id C228922B05 for ; Wed, 9 Sep 2015 22:34:50 +0000 (UTC) Received: by wicgb1 with SMTP id gb1sf839459wic.3 for ; Wed, 09 Sep 2015 15:34:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=q+zUQdaVxTfwv90Q31ZsMTW3iEMMuikKmOTAe+vZQdQ=; b=jyvPOJgqx3bZojKvOHuvnkkObP5jAtoPK2/TUXiqVsaVISIESzTko6QzXExh54oVeA jnPBm1iALnNN+DetptSRRaYGKvBWzSr+cFK6CxLCjqBqNT54GrqL0McU5MoBoyqY1eBO 1u53D/co9o8OVLwvVf5bxbb32g1HtOmlhymfRcGTmNcDep3iHmbLMKUEBv6TuqSTfkXu B1po5q5D/BcKRi5Qb57xI2Y9Psjb0LkyiJxpFD6E9r2n/xiOphUHPKTWZ7F9NIOe0FH0 g1psi3DLJuw2AxuiFp3sLgAOvcXjpojFFUXzUOX83jqiOWFtGqfFydiVS4UBWGOuMZzI dTBg== X-Gm-Message-State: ALoCoQn7ZivywjBfNVhBXu1a/ZdaStfB910psdUGn7czR/VA0gYGXwsBhanR4qVgPk+iIeEKkt8Q X-Received: by 10.112.144.99 with SMTP id sl3mr8655803lbb.12.1441838089135; Wed, 09 Sep 2015 15:34:49 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.45.72 with SMTP id k8ls135354lam.10.gmail; Wed, 09 Sep 2015 15:34:48 -0700 (PDT) X-Received: by 10.152.9.9 with SMTP id v9mr30925024laa.111.1441838088931; Wed, 09 Sep 2015 15:34:48 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id v3si8115577lae.124.2015.09.09.15.34.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Sep 2015 15:34:48 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by lanb10 with SMTP id b10so16274631lan.3 for ; Wed, 09 Sep 2015 15:34:48 -0700 (PDT) X-Received: by 10.112.125.134 with SMTP id mq6mr20600719lbb.19.1441838088692; Wed, 09 Sep 2015 15:34:48 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp597045lbq; Wed, 9 Sep 2015 15:34:47 -0700 (PDT) X-Received: by 10.107.19.234 with SMTP id 103mr59504256iot.41.1441838087789; Wed, 09 Sep 2015 15:34:47 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v3si13849046pbs.195.2015.09.09.15.34.17; Wed, 09 Sep 2015 15:34:47 -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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753338AbbIIWeE (ORCPT + 28 others); Wed, 9 Sep 2015 18:34:04 -0400 Received: from mail-la0-f49.google.com ([209.85.215.49]:33966 "EHLO mail-la0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751055AbbIIWeB (ORCPT ); Wed, 9 Sep 2015 18:34:01 -0400 Received: by laeb10 with SMTP id b10so16752125lae.1 for ; Wed, 09 Sep 2015 15:34:00 -0700 (PDT) X-Received: by 10.152.6.73 with SMTP id y9mr31606849lay.45.1441838040259; Wed, 09 Sep 2015 15:34:00 -0700 (PDT) Received: from localhost.localdomain ([46.39.50.164]) by smtp.gmail.com with ESMTPSA id w5sm2144164laa.17.2015.09.09.15.33.59 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 09 Sep 2015 15:33:59 -0700 (PDT) From: Alexey Klimov To: linux-mm@kvack.org, catalin.marinas@arm.com Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, klimov.linux@gmail.com, Alexey Klimov Subject: [PATCH 1/1] mm: kmemleak: remove unneeded initialization of object to NULL Date: Thu, 10 Sep 2015 01:33:49 +0300 Message-Id: <1441838029-4596-1-git-send-email-alexey.klimov@linaro.org> X-Mailer: git-send-email 2.1.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: alexey.klimov@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Few lines below object is reinitialized by lookup_object() so we don't need to init it by NULL in the beginning of find_and_get_object(). Signed-off-by: Alexey Klimov Acked-by: Catalin Marinas --- mm/kmemleak.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/kmemleak.c b/mm/kmemleak.c index f532f6a..444a771 100644 --- a/mm/kmemleak.c +++ b/mm/kmemleak.c @@ -488,7 +488,7 @@ static void put_object(struct kmemleak_object *object) static struct kmemleak_object *find_and_get_object(unsigned long ptr, int alias) { unsigned long flags; - struct kmemleak_object *object = NULL; + struct kmemleak_object *object; rcu_read_lock(); read_lock_irqsave(&kmemleak_lock, flags);