aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rapidio/rio-scan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rapidio/rio-scan.c')
-rw-r--r--drivers/rapidio/rio-scan.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/rapidio/rio-scan.c b/drivers/rapidio/rio-scan.c
index f935c1f71a58..44420723a359 100644
--- a/drivers/rapidio/rio-scan.c
+++ b/drivers/rapidio/rio-scan.c
@@ -297,11 +297,10 @@ static struct rio_dev *rio_setup_device(struct rio_net *net,
297 struct rio_switch *rswitch; 297 struct rio_switch *rswitch;
298 int result, rdid; 298 int result, rdid;
299 299
300 rdev = kmalloc(sizeof(struct rio_dev), GFP_KERNEL); 300 rdev = kzalloc(sizeof(struct rio_dev), GFP_KERNEL);
301 if (!rdev) 301 if (!rdev)
302 goto out; 302 goto out;
303 303
304 memset(rdev, 0, sizeof(struct rio_dev));
305 rdev->net = net; 304 rdev->net = net;
306 rio_mport_read_config_32(port, destid, hopcount, RIO_DEV_ID_CAR, 305 rio_mport_read_config_32(port, destid, hopcount, RIO_DEV_ID_CAR,
307 &result); 306 &result);
@@ -801,9 +800,8 @@ static struct rio_net __devinit *rio_alloc_net(struct rio_mport *port)
801{ 800{
802 struct rio_net *net; 801 struct rio_net *net;
803 802
804 net = kmalloc(sizeof(struct rio_net), GFP_KERNEL); 803 net = kzalloc(sizeof(struct rio_net), GFP_KERNEL);
805 if (net) { 804 if (net) {
806 memset(net, 0, sizeof(struct rio_net));
807 INIT_LIST_HEAD(&net->node); 805 INIT_LIST_HEAD(&net->node);
808 INIT_LIST_HEAD(&net->devices); 806 INIT_LIST_HEAD(&net->devices);
809 INIT_LIST_HEAD(&net->mports); 807 INIT_LIST_HEAD(&net->mports);