From: Roberta Dobrescu Date: Tue, 16 Dec 2014 09:11:45 +0000 (+0200) Subject: iio: frequency: Remove 'out of memory' message X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d9d0ac96554c21e40fd56982bc7f8f4bc557f16a;p=openwrt%2Fstaging%2Fblogic.git 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: Roberta Dobrescu Acked-by: Lars-Peter Clausen Reviewed-by: Daniel Baluta Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/frequency/adf4350.c b/drivers/iio/frequency/adf4350.c index 63a25d9e1204..2b301eba1d76 100644 --- a/drivers/iio/frequency/adf4350.c +++ b/drivers/iio/frequency/adf4350.c @@ -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);