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:
parent
589a55b07d
commit
5eb9f8caac
@ -843,8 +843,7 @@ static int cc2520_probe(struct spi_device *spi)
|
|||||||
struct cc2520_platform_data *pdata;
|
struct cc2520_platform_data *pdata;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
priv = devm_kzalloc(&spi->dev,
|
priv = devm_kzalloc(&spi->dev, sizeof(*priv), GFP_KERNEL);
|
||||||
sizeof(struct cc2520_private), GFP_KERNEL);
|
|
||||||
if (!priv) {
|
if (!priv) {
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto err_ret;
|
goto err_ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user