cc2520: use devm_kzalloc(.., sizeof(*pointer), ..) pattern

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
Varka Bhadram 2014-12-26 10:13:38 +05:30 committed by Marcel Holtmann
parent 589a55b07d
commit 5eb9f8caac

View File

@ -843,8 +843,7 @@ static int cc2520_probe(struct spi_device *spi)
struct cc2520_platform_data *pdata;
int ret;
priv = devm_kzalloc(&spi->dev,
sizeof(struct cc2520_private), GFP_KERNEL);
priv = devm_kzalloc(&spi->dev, sizeof(*priv), GFP_KERNEL);
if (!priv) {
ret = -ENOMEM;
goto err_ret;