[PATCH 5/6] net: Add driver for Armada 370/XP 10/100/1000 Mbps network controller
Sascha Hauer
s.hauer at pengutronix.de
Wed Jul 30 22:42:37 PDT 2014
Hi Ezequiel,
Looks mostly fine, only one small comment from me.
On Tue, Jul 29, 2014 at 05:45:00PM -0300, Ezequiel Garcia wrote:
> +
> +static int mvneta_probe(struct device_d *dev)
> +{
> + struct mvneta_port *priv;
> + int ret;
> +
> + priv = xzalloc(sizeof(*priv));
> +
> + priv->reg = dev_get_mem_region(dev, 0);
Any special reason to use dev_get_mem_region() here? Normally you should
use dev_request_mem_region() which allocates the resource for exclusive
use. dev_get_mem_region() should only be used in very special cases.
Please check the return value.
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 |
More information about the barebox
mailing list