Commit d9d0ac96 authored by Roberta Dobrescu's avatar Roberta Dobrescu Committed by Jonathan Cameron

iio: frequency: Remove 'out of memory' message

This patch fixes the following checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message
Signed-off-by: default avatarRoberta Dobrescu <roberta.dobrescu@gmail.com>
Acked-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Reviewed-by: default avatarDaniel Baluta <daniel.baluta@intel.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent ebd16366
......@@ -387,10 +387,8 @@ static struct adf4350_platform_data *adf4350_parse_dt(struct device *dev)
int ret;
pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
if (!pdata) {
dev_err(dev, "could not allocate memory for platform data\n");
if (!pdata)
return NULL;
}
strncpy(&pdata->name[0], np->name, SPI_NAME_SIZE - 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment