lkml.org 
[lkml]   [2017]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 5/8] [media] ttusb_dec: Move an assignment in ttusb_dec_probe()
From
Date
From: Markus Elfring <elfring@users.sourceforge.net>
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 <elfring@users.sourceforge.net>
---
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)
--
2.14.1
\
 
 \ /
  Last update: 2017-09-14 19:28    [W:0.073 / U:0.120 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site