From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA7EDC33C9E for ; Tue, 7 Jan 2020 21:22:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 94F2F24679 for ; Tue, 7 Jan 2020 21:22:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578432123; bh=3WK0oIKseIdJBhhcDj5MvEQFhrbomsZXfcbffUOPnCI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=W3jLrKEDDWtSUwrP1AwPfTGQnSwmKG0RYA+ccPzH/uirZsDMZXawmxoEs2bK1NQA6 EztdozMf8C756NTeVP2s1G5dcfUONqaNwtc5leZ+E8mAAha3cR7oYMW5DytWrjv1ZD 3MBoBJ2uLZ3YawZ2wVpSsQB8X2/h5JKvqCv1APFg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728823AbgAGVCv (ORCPT ); Tue, 7 Jan 2020 16:02:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:43196 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727752AbgAGVCr (ORCPT ); Tue, 7 Jan 2020 16:02:47 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 74D3024656; Tue, 7 Jan 2020 21:02:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578430966; bh=3WK0oIKseIdJBhhcDj5MvEQFhrbomsZXfcbffUOPnCI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0NL5MQiYCD0En8CvjrG0NjAXBLSnycDy12GQSNGan+z/+XE0Nc0N4X24AYsrQwXWQ 7NrZqI78FvxqEDSlwjxqIfIUmy/C/OVsaPq8wBaQopVKuY++zkx5np9lLjP0N0QyPL eKqfe9p/v8Itv3UJGi4UcTCS8rU5oADD1QvKKEEI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Colin Ian King , Sean Young , Mauro Carvalho Chehab Subject: [PATCH 5.4 163/191] media: flexcop-usb: ensure -EIO is returned on error condition Date: Tue, 7 Jan 2020 21:54:43 +0100 Message-Id: <20200107205341.707783845@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200107205332.984228665@linuxfoundation.org> References: <20200107205332.984228665@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King commit 74a96b51a36de4d86660fbc56b05d86668162d6b upstream. An earlier commit hard coded a return 0 to function flexcop_usb_i2c_req even though the an -EIO was intended to be returned in the case where ret != buflen. Fix this by replacing the return 0 with the return of ret to return the error return code. Addresses-Coverity: ("Unused value") Fixes: b430eaba0be5 ("[media] flexcop-usb: don't use stack for DMA") Signed-off-by: Colin Ian King Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/media/usb/b2c2/flexcop-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/media/usb/b2c2/flexcop-usb.c +++ b/drivers/media/usb/b2c2/flexcop-usb.c @@ -295,7 +295,7 @@ static int flexcop_usb_i2c_req(struct fl mutex_unlock(&fc_usb->data_mutex); - return 0; + return ret; } /* actual bus specific access functions,