Re: [PATCH 5/6] net: Add driver for Armada 370/XP 10/100/1000 Mbps network controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux