Skip to content

Commit

Permalink
drivers/net/ibmveth.c: memset fix
Browse files Browse the repository at this point in the history
> >> 	Looks like memset() is zeroing wrong nr of bytes.
> >
> > Good catch, however, I think we can just remove this memset altogether
> > since the memory gets allocated via kzalloc.
>
> Correct, that memset() is superfluous.

Ok. Then this should do it.

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>

 drivers/net/ibmveth.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Mariusz Kozlowski authored and Jeff Garzik committed Aug 7, 2007
1 parent 163642a commit 9dc83af
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/ibmveth.c
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@ static int __devinit ibmveth_probe(struct vio_dev *dev, const struct vio_device_
{
int rc, i;
struct net_device *netdev;
struct ibmveth_adapter *adapter = NULL;
struct ibmveth_adapter *adapter;

unsigned char *mac_addr_p;
unsigned int *mcastFilterSize_p;
Expand Down Expand Up @@ -997,7 +997,6 @@ static int __devinit ibmveth_probe(struct vio_dev *dev, const struct vio_device_
SET_MODULE_OWNER(netdev);

adapter = netdev->priv;
memset(adapter, 0, sizeof(adapter));
dev->dev.driver_data = netdev;

adapter->vdev = dev;
Expand Down

0 comments on commit 9dc83af

Please sign in to comment.