From patchwork Mon Sep 18 19:34:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9957503 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 898A760208 for ; Mon, 18 Sep 2017 19:35:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C9DA28CC2 for ; Mon, 18 Sep 2017 19:35:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7167E28D54; Mon, 18 Sep 2017 19:35:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 301CA28CC2 for ; Mon, 18 Sep 2017 19:35:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750791AbdIRTfK (ORCPT ); Mon, 18 Sep 2017 15:35:10 -0400 Received: from mout.web.de ([212.227.17.11]:60756 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750757AbdIRTfJ (ORCPT ); Mon, 18 Sep 2017 15:35:09 -0400 Received: from [192.168.1.2] ([78.48.130.71]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LshSX-1dEjhC0FNR-012DpL; Mon, 18 Sep 2017 21:34:59 +0200 To: linux-media@vger.kernel.org, Hans Verkuil , Mauro Carvalho Chehab , Sakari Ailus Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Subject: [PATCH] [media] sq905: Delete an error message for a failed memory allocation in sq905_dostream() Message-ID: Date: Mon, 18 Sep 2017 21:34:56 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 Content-Language: en-GB X-Provags-ID: V03:K0:CZUrbsla2Hy2irZGo8PjVsRdLwkCHvkbQcFeiuB3ajPBaDTXMS/ DG3NYPSTBj1LPLbKaMiqQk8PeViMxAo1n89Tos0R749JJ5XXbNS+yRGlXEcloKspZWulyF8 dfeec6FrNYSIBz4QfN+raco0RllITn6HyXchpslDB6CdowKZc0F0epLqs1jagWlxCInWn+1 ll09Puh+oN7gdN5wolMyA== X-UI-Out-Filterresults: notjunk:1; V01:K0:OHWlUKRvYQQ=:5XDj2ofDaAUPj3KEw9gu8n L57pU8b+SoMMmOx5aWCrqm/yFPRlI6Z1HOypmhDrkaGCB1CWb4R3EaO9Ir2dcSQWIyvmjU7F8 qkaXV/9huYZPTqPrBaboN8RxgXUWfxxW84CkZLkqO+MVoVhXbl2mg7DeMv6SxksXvxiz6A640 6jm8ie+GLtlihYMe9VgvgPkZlioGCu7fly5Wj8pgavvb8NgQAlIudL6lxMXm1v38sh3vSnpCI d5TpNGwwOXAmdB7nA0n5gEi44pRJwHhPreaEnBN5BlF6BLesRZVDgD2JRHWxRCPd3tXuLN0KP Qro+4QSf6rXmpKHjHmPIBSx1DbjIBV5P/StvcU3KKlm0NeB2WMzjm0kLTZdiGVIvv96p4IB0h q1qkeaVhxQhKv4Sm1xiwtRhMEal8BPM3FgNURRP+C5Nd5G8hpVx3qNCGaqh9kOFAiWA5OmT9M 1lPM5u5o5VabJpDNthAe8CTnrrVrjvKMv/lAHSpr7pPHdJtk5izvI4pkCKm6bzsaNA+aisKof e34xnOHV5MJfk9PT+ONXfXy9qYsm/Eg2fgx/hLWCgve/WRSAQX5IqOQOcskvGzv0la2Gp/FrN tPO4UO7trfDS6mSz8KJ5v1xMlvQmOERbF7Mod5S5w4xunF0tXtRWG7xMGbkLKN5HNRcOIxyUS 01zsZm3ow0WKTf2PAIjDSxkZpy4OEdwB3H0KEQ61UCKFms6oCskJm5LYihDLRzPxkNx4hWTcF eb08hxuK1fiYAXsWYueqoWKMWuCGHe2DpC9jG4sqm4+RE0R45Z7Ou0kVbtvxbXiegCcxjwt41 qhg4K+2h7T3JrC35Tut+kKXWoahboSb92m5R07rTn6NPK6mQY4= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Mon, 18 Sep 2017 21:30:58 +0200 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/media/usb/gspca/sq905.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/usb/gspca/sq905.c b/drivers/media/usb/gspca/sq905.c index f1da34a10ce8..ca8cdd753a2b 100644 --- a/drivers/media/usb/gspca/sq905.c +++ b/drivers/media/usb/gspca/sq905.c @@ -218,10 +218,8 @@ static void sq905_dostream(struct work_struct *work) u8 *buffer; buffer = kmalloc(SQ905_MAX_TRANSFER, GFP_KERNEL | GFP_DMA); - if (!buffer) { - pr_err("Couldn't allocate USB buffer\n"); + if (!buffer) goto quit_stream; - } frame_sz = gspca_dev->cam.cam_mode[gspca_dev->curr_mode].sizeimage + FRAME_HEADER_LEN;