[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e5f2a546-0a8e-73b4-60bf-f8e2b9e6be71@users.sourceforge.net>
Date: Thu, 14 Sep 2017 12:35:25 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: linux-media@...r.kernel.org,
Arvind Yadav <arvind.yadav.cs@...il.com>,
Hans Verkuil <hans.verkuil@...co.com>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Sakari Ailus <sakari.ailus@...ux.intel.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: [PATCH 5/8] [media] ttusb_dec: Move an assignment in
ttusb_dec_probe()
From: Markus Elfring <elfring@...rs.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@...rs.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
Powered by blists - more mailing lists