From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wzh8H-0001Us-8D for barebox@lists.infradead.org; Wed, 25 Jun 2014 06:56:38 +0000 Date: Wed, 25 Jun 2014 08:56:15 +0200 From: Sascha Hauer Message-ID: <20140625065615.GM15686@pengutronix.de> References: <1403606628-30148-1-git-send-email-sebastian.hesselbarth@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1403606628-30148-1-git-send-email-sebastian.hesselbarth@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCH v2] pinctrl: mvebu: add pinctrl drivers for Dove and Kirkwood To: Sebastian Hesselbarth Cc: barebox@lists.infradead.org On Tue, Jun 24, 2014 at 12:43:48PM +0200, Sebastian Hesselbarth wrote: > This adds pinctrl drivers for Marvell Dove and Kirkwood SoCs based > on a common driver stub. This design is based on the corresponding > Linux driver and should ease additional drivers for Marvell Armada > SoCs. > > Signed-off-by: Sebastian Hesselbarth Applied with a small change: > +static int kirkwood_pinctrl_probe(struct device_d *dev) > +{ > + const struct of_device_id *match = > + of_match_node(kirkwood_pinctrl_of_match, dev->device_node); > + struct mvebu_pinctrl_soc_info *soc = > + (struct mvebu_pinctrl_soc_info *)match->data; > + > + mpp_base = dev_request_mem_region(dev, 0); I added a return value check here. Not checking it means that the driver could do NULL pointer dereferences during runtime. I should really fix the places where the check is missing in the tree. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox