From patchwork Thu Sep 14 10:35:25 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: 9952733 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 C48D960317 for ; Thu, 14 Sep 2017 10:35:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A087628E6C for ; Thu, 14 Sep 2017 10:35:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9548228E8C; Thu, 14 Sep 2017 10:35:41 +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=ham 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 361EA28E6C for ; Thu, 14 Sep 2017 10:35:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752025AbdINKfj (ORCPT ); Thu, 14 Sep 2017 06:35:39 -0400 Received: from mout.web.de ([212.227.17.11]:52412 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751516AbdINKff (ORCPT ); Thu, 14 Sep 2017 06:35:35 -0400 Received: from [192.168.1.2] ([85.182.44.111]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LeLKb-1d5N1H3nGn-00q79k; Thu, 14 Sep 2017 12:35:27 +0200 Subject: [PATCH 5/8] [media] ttusb_dec: Move an assignment in ttusb_dec_probe() From: SF Markus Elfring To: linux-media@vger.kernel.org, Arvind Yadav , Hans Verkuil , Laurent Pinchart , Mauro Carvalho Chehab , Sakari Ailus Cc: LKML , kernel-janitors@vger.kernel.org References: <66b087d3-6dd3-1e1c-d33d-e34c9e2ffe25@users.sourceforge.net> Message-ID: Date: Thu, 14 Sep 2017 12:35:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <66b087d3-6dd3-1e1c-d33d-e34c9e2ffe25@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:OX6y4b+0yGIUS0YasIUqeXFLZJZf/ytfz5nn17qF/z+X/vot35j Bdp9xAPkn0J3LUpHWp30Uw97G3Ts8Nq+4GQ3mlRUAm4m0rfeg8+7kquGeCvzt8TP5RsJnQE jb8AsG1ptqV9+3hwH/XW9s7hrupUqUA193TYDomQPT71wAXd5bV2CnezWJpDaTM8YeCXikf rfVPgf9ivKZuAgwOKwtvg== X-UI-Out-Filterresults: notjunk:1; V01:K0:WWsQmX2Jvok=:UuY2VgSOF6cw12liC9plDJ o3/RR6UubWWkUH+zJDA4gjtn755xsD9ppFCcf0gE7tzxXSkof0laMYiZZ4FxD2IwkdpVLNvHL tuGztL3KMDFKfKNGDuh2y9bAKjg7cs60EsoubLTn76AaHAx9YK1aaPSz22cx5NdCL9QpZFGIC w6b9jkggpDQg+0MXJxTfstOzIckVzmJlRampQmu9vLpA27qmRCXjzTYbh/d7FgPJ+Zqxp/YTP z31lHvSMJ304h+rWubAhsja5/7YXvbqGB4VwOweYfI7tLJH/z0uqH6XhK/8kd2mEA+ycgQU2T hO+cQlDKyU6RnNx5gjn2dAaSEqVrsuFk9JrMpuhL8ZDozp3qyebQ0jq8FoXBhFnPdXH9FJcve lYi97FxaMmWElFfpKt7vOxU0iutUkS+8PBtAnusNmErJQQCmrfVtXPPjCPR2LA7EFbVNxtdE8 Pjg02krTS26/piI9Ek9DRLhXF+hj71lMkPm4fBO8nDBl4fxopV/HcwyNhuJ0Tv+fB9uHAPjPd 4oEe/iqH8orZYbrA4L5I1LK1vMx9lg+HyUgg4QKGeMIJQTK+FuRswfhx5NXTjLQ9UTpkYnS3A dX7QrhIaIDdmI31wDOdTf+Fzmr1zq/idPK/+1l9AGlpirnW5qrxb1r8gCiJzy7+pPGi55Ux7m rybKcYeZ3oikF2i/P/YrJhq6adfbMxbRDrUph4j9i4WvBmiXQjSYj8307Lj1tGka89t0GfESS 9GGQTOlrMhn3WhYMv/pYaX/ZcfbvZv5HT06hJmZdkhcgMeiNkqKv70T2mlaVgq3KIqbB+NduV xwDgsZczC68YTPqpSXeQ8W9Tc+nbMkHXsTfxMltO0cyY27EPw4= 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: Wed, 13 Sep 2017 20:32:25 +0200 Assign a pointer to a data structure member without using an intermediate local variable. Signed-off-by: Markus Elfring --- drivers/media/usb/ttusb-dec/ttusb_dec.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/media/usb/ttusb-dec/ttusb_dec.c b/drivers/media/usb/ttusb-dec/ttusb_dec.c index 26d637684b30..7759de653ee9 100644 --- a/drivers/media/usb/ttusb-dec/ttusb_dec.c +++ b/drivers/media/usb/ttusb-dec/ttusb_dec.c @@ -1650,14 +1650,10 @@ static const struct ttusbdecfe_config fe_config = { static int ttusb_dec_probe(struct usb_interface *intf, const struct usb_device_id *id) { - struct usb_device *udev; struct ttusb_dec *dec; int result; dprintk("%s\n", __func__); - - udev = interface_to_usbdev(intf); - dec = kzalloc(sizeof(*dec), GFP_KERNEL); if (!dec) return -ENOMEM; @@ -1678,7 +1674,7 @@ static int ttusb_dec_probe(struct usb_interface *intf, break; } - dec->udev = udev; + dec->udev = interface_to_usbdev(intf); result = ttusb_dec_init_usb(dec); if (result)