Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753445AbcCJPoa (ORCPT ); Thu, 10 Mar 2016 10:44:30 -0500 Received: from mail-io0-f181.google.com ([209.85.223.181]:34249 "EHLO mail-io0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752618AbcCJPo1 (ORCPT ); Thu, 10 Mar 2016 10:44:27 -0500 Subject: Re: [PATCH] block: fix possible NULL dereference To: Sudip Mukherjee , Jens Axboe References: <1457609953-24101-1-git-send-email-sudipm.mukherjee@gmail.com> Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org From: Jens Axboe Message-ID: <56E19658.7000403@kernel.dk> Date: Thu, 10 Mar 2016 08:44:24 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1457609953-24101-1-git-send-email-sudipm.mukherjee@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 247 Lines: 10 On 03/10/2016 04:39 AM, Sudip Mukherjee wrote: > We were checking for iter to be NULL after dereferencing it. Lets first > check it and then use it. Nobody calls it with iter == NULL, I think we should just kill the !iter check -- Jens Axboe