diff options
author | Varka Bhadram <varkabhadram@gmail.com> | 2014-12-25 23:43:38 -0500 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-12-30 01:15:55 -0500 |
commit | 5eb9f8caac333842e840325fe7299465bcdf2111 (patch) | |
tree | 7316e5a11395479ab9b754fb8a243d73e0a739ff /drivers/net/ieee802154 | |
parent | 589a55b07dfb71d4c45e008a8df8bb94ff813fe6 (diff) |
cc2520: use devm_kzalloc(.., sizeof(*pointer), ..) pattern
Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/net/ieee802154')
-rw-r--r-- | drivers/net/ieee802154/cc2520.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ieee802154/cc2520.c b/drivers/net/ieee802154/cc2520.c index 033473448d9f..bc24d9aab292 100644 --- a/drivers/net/ieee802154/cc2520.c +++ b/drivers/net/ieee802154/cc2520.c | |||
@@ -843,8 +843,7 @@ static int cc2520_probe(struct spi_device *spi) | |||
843 | struct cc2520_platform_data *pdata; | 843 | struct cc2520_platform_data *pdata; |
844 | int ret; | 844 | int ret; |
845 | 845 | ||
846 | priv = devm_kzalloc(&spi->dev, | 846 | priv = devm_kzalloc(&spi->dev, sizeof(*priv), GFP_KERNEL); |
847 | sizeof(struct cc2520_private), GFP_KERNEL); | ||
848 | if (!priv) { | 847 | if (!priv) { |
849 | ret = -ENOMEM; | 848 | ret = -ENOMEM; |
850 | goto err_ret; | 849 | goto err_ret; |