On 12/23/2014 09:51 AM, Daniel Baluta wrote:
On Tue, Dec 16, 2014 at 11:11 AM, Roberta Dobrescu
<roberta.dobrescu@xxxxxxxxx> wrote:
This patch fixes the following checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message
Signed-off-by: Roberta Dobrescu <roberta.dobrescu@xxxxxxxxx>
---
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;
- }
Based on Harmut's review we can return ERR_PTR(-ENOMEM) here
and then use IS_ERR and PTR_ERR inside adf4350_probe()
This patch is fine as it is. It removes the redundant error message. Every
thing else should be done in a second patch.
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html