diff options
author | Ravindran, Madhusudhanan (M.) <mravindr@visteon.com> | 2015-03-13 13:12:37 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-20 14:13:17 +0100 |
commit | 4bc88f63d7af89831fac82b67625f3e19156abba (patch) | |
tree | 9f2869ca6d3b7b8a0c89c3b92168639bbfdb4b47 /drivers/staging/netlogic | |
parent | 877945759df5ff6e7fb434cb5b6cddb606c2f66f (diff) | |
download | linux-4bc88f63d7af89831fac82b67625f3e19156abba.tar.gz linux-4bc88f63d7af89831fac82b67625f3e19156abba.tar.bz2 linux-4bc88f63d7af89831fac82b67625f3e19156abba.zip |
staging: netlogic: allocate right size in devm_kzalloc
sizeof when applied to a pointer typed expression gives
the size of the pointer.
The semantic patch that makes this change is available
in scripts/coccinelle/misc/noderef.cocci.
Signed-off-by: Madhusudhanan Ravindran <mravindr@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/netlogic')
-rw-r--r-- | drivers/staging/netlogic/xlr_net.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/netlogic/xlr_net.c b/drivers/staging/netlogic/xlr_net.c index e8aae09d1624..8ae01753b011 100644 --- a/drivers/staging/netlogic/xlr_net.c +++ b/drivers/staging/netlogic/xlr_net.c @@ -1012,7 +1012,7 @@ static int xlr_net_probe(struct platform_device *pdev) * Allocate our adapter data structure and attach it to the device. */ adapter = (struct xlr_adapter *) - devm_kzalloc(&pdev->dev, sizeof(adapter), GFP_KERNEL); + devm_kzalloc(&pdev->dev, sizeof(*adapter), GFP_KERNEL); if (!adapter) { err = -ENOMEM; return err; |