Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756986AbbBEMvm (ORCPT ); Thu, 5 Feb 2015 07:51:42 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:37166 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752004AbbBEMvl (ORCPT ); Thu, 5 Feb 2015 07:51:41 -0500 Date: Thu, 5 Feb 2015 15:51:24 +0300 From: Dan Carpenter To: Sudip Mukherjee Cc: devel@driverdev.osuosl.org, Rickard Strandqvist , Chaitanya Hazarey , Greg Kroah-Hartman , Peter P Waskiewicz Jr , linux-kernel@vger.kernel.org, Greg Donald , Koray Gulcu Subject: Re: [PATCH v2] staging: rtl8192u: r8192U_core: Fix for possible null pointer dereference Message-ID: <20150205125124.GG5336@mwanda> References: <1422557952-4209-1-git-send-email-rickard_strandqvist@spectrumdigital.se> <20150205122745.GF5336@mwanda> <20150205124322.GA8137@sudip-PC> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150205124322.GA8137@sudip-PC> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: ucsinet22.oracle.com [156.151.31.94] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 625 Lines: 18 On Thu, Feb 05, 2015 at 06:13:22PM +0530, Sudip Mukherjee wrote: > if (driver_info) { > stats->RxIs40MHzPacket = driver_info->BW; > if (stats->RxDrvInfoSize != 0) > TranslateRxSignalStuff819xUsb(skb, stats, driver_info); > } If driver_info is non-NULL then stats->RxDrvInfoSize is not zero and also the reverse. So really you only need to test one. regards, dan carpenter -- 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/