iio: frequency: Remove 'out of memory' message
authorRoberta Dobrescu <roberta.dobrescu@gmail.com>
Tue, 16 Dec 2014 09:11:45 +0000 (11:11 +0200)
committerJonathan Cameron <jic23@kernel.org>
Fri, 26 Dec 2014 09:36:17 +0000 (09:36 +0000)
This patch fixes the following checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message

Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/frequency/adf4350.c

index 63a25d9e120486db1dd1c023b0b0456f32da68a1..2b301eba1d768f9053eafb16e0d5a0abef9d8014 100644 (file)
@@ -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);