mirror of https://gitee.com/openkylin/linux.git
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;
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue