Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965773AbeAJPcm (ORCPT + 1 other); Wed, 10 Jan 2018 10:32:42 -0500 Received: from mout.web.de ([212.227.17.11]:53848 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752835AbeAJPci (ORCPT ); Wed, 10 Jan 2018 10:32:38 -0500 Subject: [PATCH 1/3] misc/ti-st: Delete an error message for a failed memory allocation in kim_probe() From: SF Markus Elfring To: kernel-janitors@vger.kernel.org, Arnd Bergmann , Arvind Yadav , "David S. Miller" , Greg Kroah-Hartman , Johannes Berg , Stephen Hemminger Cc: LKML References: Message-ID: <8aad653c-de9d-491f-140b-259dd7569404@users.sourceforge.net> Date: Wed, 10 Jan 2018 16:32:23 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:e6ZuN0GczANjI8WMda2hEKl3ILQ5g8/MORdWIUFD0mK0iN6+6Xu 5Sl/IAeI+R5dovhCprIR8ERKPabVVX39DosgH9F98LglgGWXbTypcsu2BxLKxcv/R1qpilK PHrYmSRm5yHVACFxXO7avQ2HyorjHL9Izmw8sGMHy6EtsRh4HNjVpLeEUn158/CPMOZFc3l g3jCM0jB+5BoBwy3jpXjQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:FGxqz8s8KRg=:+rbGjGHwBp/4wo6r5k4PW1 wv+mrh+LtfkhmMjONiOV86BV0vnBtm+NhRmkLraYf6nTinoHORyyJETyYCNzjrWz4DjwvvT1t K++Vl+PH2ELNiHAN6vtR5N9x2f3kWePNCCGahIoMtrIGnVjGO7b4S+CCWo1QBKxhOAnNYlwFI u8wdqtGxDF4Fmr6/w6+2RQUepqJGI95H0LtcIODsqYkXl8cI23XDzStJnYziXGgqZzw/iWAwA TYU4Qyt7zB73wvO7oGJoTT6Z81v0Wic2gRUWW6WIFZKJErP4A+HOmcitw8dM+6Z3tHK2zzYxr Fy+f5rwDCDw7pBcc9liYDcBvCIQWf3UxqCR4gMGfgzej69lKcpFBjWMApDlOBK8Vi5cC+DGkC ysLP1B46VmJ47mQJ1aIzP4OjvflUNNonCwbqN//xEZDMxhrn2tFIg4jqiFsDwPuZb4ndO4Ik1 qlOxbPdY95wkmLlUEOfxXilOPLUpN/bZK32Y9jbEmvnSbyojBQO6KUEZZHvjKagRL5uSyEa7k jSI59H2E3trg+Yq/1zbnShcx+PIWq6xXUN/t9NOK5+mnMnL/UiE74g/fGlr+cGYZfbC7uxtQQ 9ZqdglgZ+j8N8fF3mN8XfhXQEP/zuKDXsWPmuMFOuLFIIE+gJytvSRXw0LJFKB+VeWBuE6SaP 3lh/+Y1NY1qOPRYO6zVTHsKjHVPgUUCFMbc574HZgMbmH9g4f3o25/NmOnip/NDtV8Wy54gA9 z2EK+v1q+YOZsvFx3xgjxN6zQalN7+ncXyA4soom0As1vDJBtw5FEdOFZ0DS7Ec+v2HQlBAng 5PJhB+U4mGwRTRf/YfHVTzHt3EeMNBzwwjOy4053qCyXgVIhCQ= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: From: Markus Elfring Date: Wed, 10 Jan 2018 16:04:52 +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/misc/ti-st/st_kim.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c index b77aacafc3fc..68ebdf466b17 100644 --- a/drivers/misc/ti-st/st_kim.c +++ b/drivers/misc/ti-st/st_kim.c @@ -736,10 +736,9 @@ static int kim_probe(struct platform_device *pdev) } kim_gdata = kzalloc(sizeof(struct kim_data_s), GFP_ATOMIC); - if (!kim_gdata) { - pr_err("no mem to allocate"); + if (!kim_gdata) return -ENOMEM; - } + platform_set_drvdata(pdev, kim_gdata); err = st_core_init(&kim_gdata->core_data); -- 2.15.1