From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752169AbcBOQbj (ORCPT ); Mon, 15 Feb 2016 11:31:39 -0500 Received: from mga11.intel.com ([192.55.52.93]:46469 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751235AbcBOQbh (ORCPT ); Mon, 15 Feb 2016 11:31:37 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,451,1449561600"; d="scan'208";a="652469744" Date: Mon, 15 Feb 2016 22:05:24 +0530 From: Vinod Koul To: Robert Jarzmik Cc: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Daniel Mack , Haojian Zhuang , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org Subject: Re: [PATCH 4/4] dmaengine: pxa_dma: fix the maximum requestor line Message-ID: <20160215163524.GI19598@localhost> References: <1455225798-9510-1-git-send-email-robert.jarzmik@free.fr> <1455225798-9510-5-git-send-email-robert.jarzmik@free.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1455225798-9510-5-git-send-email-robert.jarzmik@free.fr> 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 Thu, Feb 11, 2016 at 10:23:18PM +0100, Robert Jarzmik wrote: > @@ -1399,13 +1405,17 @@ static int pxad_probe(struct platform_device *op) > return PTR_ERR(pdev->base); > > of_id = of_match_device(pxad_dt_ids, &op->dev); > - if (of_id) > + if (of_id) { > of_property_read_u32(op->dev.of_node, "#dma-channels", > &dma_channels); > - else if (pdata && pdata->dma_channels) > + of_property_read_u32(op->dev.of_node, "#requestors", > + &nb_requestors); I think we should check the return value here. This might be err in case when we have older DT on platform, but still should work with default in that case > + } else if (pdata && pdata->dma_channels) { > dma_channels = pdata->dma_channels; > - else > + nb_requestors = pdata->nb_requestors; > + } else { > dma_channels = 32; /* default 32 channel */ > + } -- ~Vinod