Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753104AbeAEVfV (ORCPT + 1 other); Fri, 5 Jan 2018 16:35:21 -0500 Received: from mout.web.de ([212.227.17.12]:56950 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753025AbeAEVfU (ORCPT ); Fri, 5 Jan 2018 16:35:20 -0500 To: linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Boris Brezillon , Brian Norris , Chen-Yu Tsai , Cyrille Pitchen , David Woodhouse , Marek Vasut , Maxime Ripard , Richard Weinberger Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Subject: [PATCH] mtd/nand/sunxi: Delete an error message for a failed memory allocation in sunxi_nand_chip_init() Message-ID: <9a6e9845-23f0-0eb8-3c5b-d877e9874a1d@users.sourceforge.net> Date: Fri, 5 Jan 2018 22:34:33 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:uP1H1DBgl6OlfARdLQwehtsV0qbLS8ZPkSBZpTuXjss5kvOYwXY SO1J6aziBOmMRmM/+dxAheYb9M/TyCjUAywERO88aB2yTf3zbz33+WkWC0OKjmRqR0D9MD1 piKWHP+jOiTv5ijTh/vZb6VnPt97CCZqF/rw5oulbPTBMp7tfzonkcLTyxki8II5psoDTlX SltPBcIXFaKP6WAl9GbUA== X-UI-Out-Filterresults: notjunk:1;V01:K0:tKyAUC43Mc0=:LRy+K/TDyKP/+bOwJR7CfW +HhzF4huDKfhtDjYef4/gPgoVneJPpiTaM3C7vkF+T76SI1RPD78nQ3cIc7isDpOzZavm6hO1 VmY/sED+itECdRZ43bY8tv/t0DHLyKKG+pk4sy8Mu+rJd1kvKLJy176ug+NrU1YCDcRSvD7AA G6QUy5hIoW3tvCpJGr6EVXF+5b4ESDTRF5btMXRtEVnijc/3Q3U3FeuiKPW3t9Z1OJRap4FCL TuqSZj9qKLj7rM3QUILCSlj86oEVkBRfagkYnVFzXoLA2t6eNDGw6Cd/KNj5cIpm7ZjlOEuGW gAV1T+hxGlyK9Rz2HT0lnbcOIOSzWpXgiYvhEEi7TFAkVmYLXtDvjWwQykGmeQ+7PgRN4zios oM3Gf6HszmJvJFg4iOJHDIdlfrHvsCR4WQbuLxI8RbIAg5dPwiGOcnF6BuwSRGerFcI5lzn68 ubFG9EHbwUNFBVNN8qrWeyhyFKzI8iTXjqyX8o42VojwzytKnAeaXA5czmwKcgBooWswG3ngO q9bIUbS9MuebBbNWIOQl1fuqE/0XCYaib6FezF7N88j9oWGCU8ZwtnCAF+nsLB4pmgUL7PHzd p3QdLCxqAlzoeWMOkCa0qIXSC7OnHeVFL0D5fKdr8VWj4oiy/q3w6vRD3CnG4eTtbF+pixIxu 7O/pyWwly1vEVk9D56NvnLVz+JQo/ZHy+gxDFdAspcx1fjB3K823mCCB6uBXS2O4X4Cl47FKh FRoLwJ4svMHTQ5iIiol/utgFjgrl0fNbMSMVlUmKT6jJedsrV7YrSuFAaAXLYjI9hJlqA28JD +HlSk6iCZHaiKxJo3vvOu00wfTZBTlz+qC0XVryQ0q7gdD0or0= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: From: Markus Elfring Date: Fri, 5 Jan 2018 22:27:09 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/mtd/nand/sunxi_nand.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mtd/nand/sunxi_nand.c b/drivers/mtd/nand/sunxi_nand.c index 82244be3e766..ebfa130a9285 100644 --- a/drivers/mtd/nand/sunxi_nand.c +++ b/drivers/mtd/nand/sunxi_nand.c @@ -2019,10 +2019,8 @@ static int sunxi_nand_chip_init(struct device *dev, struct sunxi_nfc *nfc, sizeof(*chip) + (nsels * sizeof(struct sunxi_nand_chip_sel)), GFP_KERNEL); - if (!chip) { - dev_err(dev, "could not allocate chip\n"); + if (!chip) return -ENOMEM; - } chip->nsels = nsels; chip->selected = -1; -- 2.15.1