From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: iommu/amd: Implement dm_region call-backs Date: Thu, 11 Jun 2015 09:43:27 +0200 Message-ID: <20150611074327.GD16345@suse.de> References: <20150610153920.GC10549@mwanda> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20150610153920.GC10549@mwanda> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Dan Carpenter Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org List-Id: iommu@lists.linux-foundation.org On Wed, Jun 10, 2015 at 06:39:20PM +0300, Dan Carpenter wrote: > Hello Joerg Roedel, > > The patch b61238c4a5e1: "iommu/amd: Implement dm_region call-backs" > from May 28, 2015, leads to the following static checker warning: > > drivers/iommu/amd_iommu.c:3153 amd_iommu_get_dm_regions() > error: potential null dereference 'region'. (kzalloc returns null) Thanks for the report, I added a check for the return value and folded it back into the original patch. What static checker do you use, btw? Joerg