Received: by 10.223.185.116 with SMTP id b49csp1897796wrg; Thu, 22 Feb 2018 05:05:06 -0800 (PST) X-Google-Smtp-Source: AH8x224ddSsmeivsFjfekLsrrTpWLNLeNrKuDi4IjVKpttJPeVHafEMc7FuYKIoIJfePen3TyWLe X-Received: by 10.98.194.87 with SMTP id l84mr6900545pfg.6.1519304706578; Thu, 22 Feb 2018 05:05:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519304706; cv=none; d=google.com; s=arc-20160816; b=cG35iVdajL42SXrbbwQV7vIK2PAC6hWN14b8IRYS2R7Ke03YjuNxSB7eRN0NE4UU7D OV59aYv28FtthP8dtJXp6TJBK1HToJvC0O7CqbwNH+tr0b6Y2ZHzE59TpmhvonM0JwoZ 6YUz12Wqxe3wgyf4FGd3f7ZDXjOhjuS+Se0kU6XhsIAk79CrDYWuIjfz9LOphL8yF0Ny GveSpf7BVGESJppuyXWHP7gyl0vq4kpvY4CBOZUo6F0rSdnsAYL7OSfbDzY/eszJAOse EklHRECRDHHhGRsW5AF49d+N9tnRS+yq2oN9qCaDkW4US7Tmn8X1Xq2qT3hkMg7NJROw mUng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=vmiuVcUSMXXVGpNIeMR54uloIVrdgAVG4U9nkZ99OvU=; b=G/UaNr/kz5YZqvRQSJnY9Z0YJkrasvhDRHsMEUP+jCCRo4pgNtTITYi7/yDBdQCG5E D8uWb4qkwF5a80pCmAK3q2VeR3KOb0Raj5H+B5ujRuEl+ujFgJUk5dzkfchrk1Tpyqw3 ixzNXUM1JMy0hJ9PIj/yiSKXBkoVjGm0PeP4IGpDLQrULMuymY/9M2d/Hmvf2wUo1CYH BDm5XNKZK7PdHE2DkkDeWTnz2r5jpYikgvgwXds9FDykGq9SLjmKZlAWyn4RMKWgnP2J Pmjl94UuqbTIUu/abMrIXOY+h8HHxKl9raxdrANfWC4Ui8HtA2cRsP72g5RO19qrxJ0I Q2zA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b62si22967pfa.29.2018.02.22.05.04.51; Thu, 22 Feb 2018 05:05:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932470AbeBVM7X (ORCPT + 99 others); Thu, 22 Feb 2018 07:59:23 -0500 Received: from mx0b-001ae601.pphosted.com ([67.231.152.168]:47524 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932199AbeBVM7R (ORCPT ); Thu, 22 Feb 2018 07:59:17 -0500 Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w1MCrm06030987; Thu, 22 Feb 2018 06:59:15 -0600 Authentication-Results: ppops.net; spf=none smtp.mailfrom=ckeepax@opensource.cirrus.com Received: from mail4.cirrus.com ([87.246.98.35]) by mx0b-001ae601.pphosted.com with ESMTP id 2g6hprdwdj-1; Thu, 22 Feb 2018 06:59:15 -0600 Received: from EX17.ad.cirrus.com (unknown [172.20.9.81]) by mail4.cirrus.com (Postfix) with ESMTP id 56E37611CE70; Thu, 22 Feb 2018 07:00:08 -0600 (CST) Received: from imbe.wolfsonmicro.main (198.61.95.81) by EX17.ad.cirrus.com (172.20.9.81) with Microsoft SMTP Server id 14.3.301.0; Thu, 22 Feb 2018 12:59:14 +0000 Received: from algalon.ad.cirrus.com (algalon.ad.cirrus.com [198.90.251.122]) by imbe.wolfsonmicro.main (8.14.4/8.14.4) with ESMTP id w1MCxEPo011915; Thu, 22 Feb 2018 12:59:14 GMT From: Charles Keepax To: CC: , Subject: [PATCH 2/5] regmap: Remove unnecessary printk for failed allocation Date: Thu, 22 Feb 2018 12:59:11 +0000 Message-ID: <20180222125914.17016-2-ckeepax@opensource.cirrus.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180222125914.17016-1-ckeepax@opensource.cirrus.com> References: <20180222125914.17016-1-ckeepax@opensource.cirrus.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=793 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1802220164 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Charles Keepax --- drivers/base/regmap/regmap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index 8a6de76f89bb..c84c4d5d2df7 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -2052,10 +2052,9 @@ int regmap_bulk_write(struct regmap *map, unsigned int reg, const void *val, return -EINVAL; wval = kmemdup(val, val_count * val_bytes, map->alloc_flags); - if (!wval) { - dev_err(map->dev, "Error in memory allocation\n"); + if (!wval) return -ENOMEM; - } + for (i = 0; i < val_count * val_bytes; i += val_bytes) map->format.parse_inplace(wval + i); -- 2.11.0