From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Roberta Dobrescu To: jic23@kernel.org, linux-iio@vger.kernel.org Cc: octavian.purdila@intel.com, daniel.baluta@intel.com, lars@metafoo.de, Michael.Hennerich@analog.com, knaack.h@gmx.de, pmeerw@pmeerw.net, Roberta Dobrescu Subject: [PATCH 1/3] iio: frequency: Remove 'out of memory' message Date: Tue, 16 Dec 2014 11:11:45 +0200 Message-Id: <1418721107-5429-2-git-send-email-roberta.dobrescu@gmail.com> In-Reply-To: <1418721107-5429-1-git-send-email-roberta.dobrescu@gmail.com> References: <1418721107-5429-1-git-send-email-roberta.dobrescu@gmail.com> List-ID: This patch fixes the following checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Signed-off-by: Roberta Dobrescu --- drivers/iio/frequency/adf4350.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/iio/frequency/adf4350.c b/drivers/iio/frequency/adf4350.c index 63a25d9..2b301eb 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); -- 1.9.1