From patchwork Sat Jul 31 17:18:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salah Triki X-Patchwork-Id: 490255 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=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS 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 9FBBBC4338F for ; Sat, 31 Jul 2021 17:18:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 74BB260F94 for ; Sat, 31 Jul 2021 17:18:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230441AbhGaRSv (ORCPT ); Sat, 31 Jul 2021 13:18:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229647AbhGaRSv (ORCPT ); Sat, 31 Jul 2021 13:18:51 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5F24C06175F; Sat, 31 Jul 2021 10:18:43 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id k4so4875950wrc.0; Sat, 31 Jul 2021 10:18:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=TYAR2TN+HLCEo0IKM3gk6gNN7p0qbP1mcajdWTzCkkY=; b=M52/iticaY8knwq6V+LuB99CyidPAlzmvQfhb8aOvzqHW7LGjltktcTpGSBpcgpAtv aRqCuVZxgRY+DIOV5aVcTrn8ojoXt3/3+ERV2QTd4y62aCoyellhOEJzSlYphSs8fX9m +Fho4SANqRyMU1uUZ09305tU1Fnl5CG37lPS15Mxz2vv8F1gDGq9OU00IHQCq6V7aoJd KLSGbWvIBiRcYI6ORBNh4iZvi19zKieMZ/RQC4q3hLNyOFCtrC+nxAiePGCYWdWG4tHO pRKg1KEhxb2s4EJzXTolT/0wN46eCmqfsNGN94FgOpHRyf2KblSIX/Lsoxz1ZNFhCnW9 1GCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=TYAR2TN+HLCEo0IKM3gk6gNN7p0qbP1mcajdWTzCkkY=; b=AgUzJaqgvi156J0FxDMZo1xezvvSsyyPPAIhKRaNasDgQPRRDYHCtZa2kJuBOyd+Cv hJVhAzihBiMCFwMTLmTo/Ep1EmDATadoQ3xuYIns09sOBKsRvMjw06UD31vCGESMg+71 bk9GVQohfUHRJetZ98Jjo/iXE9gaamyIPrhcXWymyaq4ksS0zH+xM6cQ00+N6AogMYq0 f3v12cUI9NXnM5S/EXqhs1pL0BmnsSfnn1CUxZQ93tnGgH1ijOv9mVB+GxYPlTBAwBPO zEVJfbClumJKq7hsrvO5dCEG/hDGVVgNpV+J0L2Z0YkEwfaDJZbRG9KhPlUfzkIw+on4 QCwg== X-Gm-Message-State: AOAM5333GDevt+Ygcep0UcbsKO6NzHTnalgRHCdFVF1jyXNIZojnv4/P vJKV196aR6w/s6JsRXvO448= X-Google-Smtp-Source: ABdhPJyR1F4x3H45pg0po8H4tQtOMk0FvgFyxWTrukbMTvdYsD1NEAAJH8WrPAQ2C4QTCzuUSfIdXQ== X-Received: by 2002:a5d:5111:: with SMTP id s17mr8868165wrt.227.1627751922345; Sat, 31 Jul 2021 10:18:42 -0700 (PDT) Received: from pc ([196.235.233.206]) by smtp.gmail.com with ESMTPSA id m39sm4971255wms.28.2021.07.31.10.18.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Jul 2021 10:18:41 -0700 (PDT) Date: Sat, 31 Jul 2021 18:18:38 +0100 From: Salah Triki To: Felipe Balbi , Greg Kroah-Hartman , Peter Chen , Jack Pham , Wesley Cheng , kernel test robot , "Gustavo A. R. Silva" , Dean Anderson , Andrew Gabbasov , Vamsi Krishna Samavedam Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] usb: gadget: remove useless cast Message-ID: <20210731171838.GA912463@pc> MIME-Version: 1.0 Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Remove the cast done by ERR_PTR() and PTR_ERR() since data is of type char * and fss_prepare_buffer() should returns a value of this type. Signed-off-by: Salah Triki Acked-by: Felipe Balbi --- drivers/usb/gadget/function/f_fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c index 9c0c393abb39..e411555e4c34 100644 --- a/drivers/usb/gadget/function/f_fs.c +++ b/drivers/usb/gadget/function/f_fs.c @@ -3831,7 +3831,7 @@ static char *ffs_prepare_buffer(const char __user *buf, size_t len) data = memdup_user(buf, len); if (IS_ERR(data)) - return ERR_PTR(PTR_ERR(data)); + return data; pr_vdebug("Buffer from user space:\n"); ffs_dump_mem("", data, len);