From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754225AbcHVGVM (ORCPT ); Mon, 22 Aug 2016 02:21:12 -0400 Received: from mga02.intel.com ([134.134.136.20]:46662 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751287AbcHVGVK (ORCPT ); Mon, 22 Aug 2016 02:21:10 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,558,1464678000"; d="scan'208";a="159213160" Date: Mon, 22 Aug 2016 11:58:51 +0530 From: Vinod Koul To: LABBE Corentin Cc: dan.j.williams@intel.com, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] dmaengine: img-mdc: fix a possible NULL dereference Message-ID: <20160822062851.GO2890@localhost> References: <1471337058-15372-1-git-send-email-clabbe.montjoie@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1471337058-15372-1-git-send-email-clabbe.montjoie@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 16, 2016 at 10:44:18AM +0200, LABBE Corentin wrote: > of_match_device could return NULL, and so cause a NULL pointer > dereference later at line 850: > mdma->soc = match->data; > > For fixing this problem, we use of_device_get_match_data(), this will > simplify the code a little by using a standard function for > getting the match data. > > Reported-by: coverity (CID 1324134) The reported-by tags expects an email ID. I have modfied this to freetext and applied -- ~Vinod