aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb
Commit message (Collapse)AuthorAge
...
| * [media] siano: get rid of sms_dbg parameterMauro Carvalho Chehab2015-02-26
| | | | | | | | | | | | | | All siano modules have a sms_dbg parameter. Now that we're using the standard pr_debug() macro, we can get rid of it. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * [media] siano: get rid of sms_info()Mauro Carvalho Chehab2015-02-26
| | | | | | | | | | | | | | On most cases, sms_info() should actually be pr_debug(), but, on other places, it should be pr_info(). Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * [media] siano: replace sms_debug() by pr_debug()Mauro Carvalho Chehab2015-02-26
| | | | | | | | | | | | | | There's no reason to use a macro here. Just replace everything, and let those debug messages to be activated via dynamic printk. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * [media] siano: replace sms_err by pr_errMauro Carvalho Chehab2015-02-26
| | | | | | | | | | | | | | | | Originally, sms_err() would be also displaying the line where the error occurs, but the messages are clear enough. Also, the function is always printed. So, no need for it. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * [media] siano: replace sms_warn() by pr_warn()Mauro Carvalho Chehab2015-02-26
| | | | | | | | | | | | | | There's no reason for a sms' own sms_warn macro. Just replace it by the standard pr_warn(). Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * [media] siano: use pr_* print functionsMauro Carvalho Chehab2015-02-26
| | | | | | | | | | | | | | | | | | | | Instead of defining its own set of printk functions, let's use the common Kernel debug logic provided by pr_foo functions. As a first step, let's just define the existing macros as the Kernel ones. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * [media] siano: add support for the media controller at USB driverMauro Carvalho Chehab2015-02-26
| | | | | | | | | | | | | | | | | | | | | | | | | | Adding support for the media controller for a pure DVB device is simple: just create a struct media_device and add it to the dvb adapter. After creating all DVB devices, we need to call the DVB core, for it to create the media graph. More work is needed for pure DVB tuners, but this is hidden at the Siano driver, just like several others non-hybrid devices. So, this is streight forward. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * [media] cx231xx: enable the analog tuner at buffer setupMauro Carvalho Chehab2015-02-26
| | | | | | | | | | | | | | | | buf_prepare callback is called for every queued buffer. This is an overkill. Call it at buf_setup, as this should be enough. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * [media] cx231xx: Improve the media controller commentMauro Carvalho Chehab2015-02-26
| | | | | | | | | | | | | | | | | | | | | | | | There are two problems at the comment: - it is badly idented; - its comment doesn't mean anything. Fix it. Requested-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * [media] cx231xx: fix compilation if the media controller is not definedMauro Carvalho Chehab2015-02-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | drivers/media/usb/cx231xx/cx231xx-cards.c: In function ‘cx231xx_usb_probe’: drivers/media/usb/cx231xx/cx231xx-cards.c:1589:15: error: ‘struct v4l2_device’ has no member named ‘mdev’ dev->v4l2_dev.mdev = dev->media_dev; ^ drivers/media/usb/cx231xx/cx231xx-cards.c:1589:26: error: ‘struct cx231xx’ has no member named ‘media_dev’ dev->v4l2_dev.mdev = dev->media_dev; ^ scripts/Makefile.build:257: recipe for target 'drivers/media/usb/cx231xx/cx231xx-cards.o' failed Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * [media] cx231xx: enable tuner->decoder link at videobuf startMauro Carvalho Chehab2015-02-13
| | | | | | | | | | | | | | The tuner->decoder needs to be enabled when we're about to start streaming. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * [media] cx231xx: create DVB graphMauro Carvalho Chehab2015-02-13
| | | | | | | | | | | | | | | | cx231xx is simple with regards to DVB: all boards have just one DVB adapter. So, we can use the default DVB helper function to create the DVB media graph. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * [media] cx231xx: create media links for analog modeMauro Carvalho Chehab2015-02-13
| | | | | | | | | | | | | | | | | | | | Now that we have entities and pads, let's create media links between them, for analog setup. We may not have all the links for digital yet, as the dvb extention may not be loaded yet. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * [media] cx231xx: initialize video/vbi padsMauro Carvalho Chehab2015-02-13
| | | | | | | | | | | | Both video and vbi are sink pads. Initialize them as such. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * [media] cx231xx: add media controller supportMauro Carvalho Chehab2015-02-13
| | | | | | | | | | | | | | | | | | | | | | Let's add media controller support for this driver and register it for both V4L and DVB. The media controller on this driver is not mandatory, as it can fully work without it. So, if the media controller register fails, just print an error message, but proceed with device registering. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * [media] gpsca: remove the risk of a division by zeroLuis de Bethencourt2015-02-10
| | | | | | | | | | | | | | | | | | | | | | | | As reported by Peter Kovar, there's a potential risk of a division by zero on calls to jpeg_set_qual() when quality is zero. As quality can't be 0 or lower than that, add an extra clause to cover this special case. Signed-off-by: Luis de Bethencourt <luis.bg@samsung.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] rtl28xxu: return success for unimplemented FE callbackAntti Palosaari2015-04-02
| | | | | | | | | | | | | | | | | | | | Return success for FE callback on case we don't have any special implementation. fc0013 tuner driver calls that callback in order to switch antenna input, even we don't provide antenna switch. Returning error caused fc0013 driver given up tuning. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] media: fix gspca drivers build dependenciesRandy Dunlap2015-03-03
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several (15) drivers in media/usb/gspca use IF_ENABLED(CONFIG_INPUT) to decide if they should call input* interfaces, but those drivers do not build successfully when CONFIG_INPUT=m and the gspca drivers are builtin (=y). Making USB_GSPCA depend on INPUT || INPUT=n fixes the build dependencies and allows all of them to build cleanly. Fixes these build errors (selections, not all are listed): drivers/built-in.o: In function `gspca_disconnect': (.text+0x32ed0f): undefined reference to `input_unregister_device' drivers/built-in.o: In function `sd_isoc_irq': konica.c:(.text+0x333098): undefined reference to `input_event' konica.c:(.text+0x3330ab): undefined reference to `input_event' drivers/built-in.o: In function `sd_stopN': konica.c:(.text+0x3338d3): undefined reference to `input_event' konica.c:(.text+0x3338e5): undefined reference to `input_event' drivers/built-in.o: In function `ov51x_handle_button': ov519.c:(.text+0x335ddb): undefined reference to `input_event' drivers/built-in.o:ov519.c:(.text+0x335ded): more undefined references to `input_event' follow pac7302.c:(.text+0x336ea1): undefined reference to `input_event' pac7302.c:(.text+0x336eb3): undefined reference to `input_event' drivers/built-in.o: In function `sd_pkt_scan': spca561.c:(.text+0x338fd8): undefined reference to `input_event' drivers/built-in.o:spca561.c:(.text+0x338feb): more undefined references to `input_event' follow t613.c:(.text+0x33a6fd): undefined reference to `input_event' drivers/built-in.o:t613.c:(.text+0x33a70f): more undefined references to `input_event' follow Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] lmedm04: add read snr, signal strength and ber call backsMalcolm Priestley2015-02-03
| | | | | | | This allows calling the original functions providing the streaming is off. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] lmedm04: Create frontend call back for read statusMalcolm Priestley2015-02-03
| | | | | | | | | | | | | | | | | | | | | | | Create dm04_read_status to check lock through either interrupt values or directly by the call back. When the device is not streaming the frontends original call back is used. When streaming has started it turns off I2C messaging by setting st->i2c_talk_onoff to zero. I2C can only be turn on again by one of the other allowed frontend calls. All old code is removed from lme2510_msg and this function only needs to set st->i2c_talk_onoff to 1. The lock status is saved and when the frondend is locked is maintained by lme2510_int_response who will now just kill the lock. The call back for rs2000 tuner is nologer required. All frontend types have been tested. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] lmedm04: create frontend callbacks for signal/snr/ber/ucblocksMalcolm Priestley2015-02-03
| | | | | | | | | | Create call backs dm04_read_signal_strength, dm04_read_snr and move dm04_read_ber and dm04_read_ucblocks for all frontends Removing the I2C filtering from lme2510_msg and the old rs2000 callbacks. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] lmedm04: Fix usb_submit_urb BOGUS urb xfer, pipe 1 != type 3 in ↵Malcolm Priestley2015-02-03
| | | | | | | | | | | | | interrupt urb A quirk of some older firmwares that report endpoint pipe type as PIPE_BULK but the endpoint otheriwse functions as interrupt. Check if usb_endpoint_type is USB_ENDPOINT_XFER_BULK and set as usb_rcvbulkpipe. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] lmedm04: Increase Interupt due time to 200 msecMalcolm Priestley2015-02-03
| | | | | | | | | | | Ocassionally the device fails to report back an interrupt urb status which results in false no lock trigger on the RS2000 demodulator. Increase time from 60 msecs to 200 msecs. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Cc: <stable@vger.kernel.org> # v3.17+ Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] rtl28xxu: properly initialize pdataMauro Carvalho Chehab2015-02-03
| | | | | | | | As complained by smatch: drivers/media/usb/dvb-usb-v2/rtl28xxu.c:1159 rtl2832u_tuner_attach() info: 'pdata' is not actually initialized (unreached code). Cc: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] rtl28xxu: correct reg access routine name prefixesAntti Palosaari2015-02-03
| | | | | | | Use rtl28xxu_ prefix for all register access routine names. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] rtl28xxu: merge rtl2831u and rtl2832u propertiesAntti Palosaari2015-02-03
| | | | | | | | As all the callbacks are already same we could merge device properties struct too and save space. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] rtl28xxu: merge chip type specific all callbacksAntti Palosaari2015-02-03
| | | | | | | | | | | Merge all chip type specific prefixed (rtl2831u_ and rtl2832u_) callback to top level callback prefixed as rtl28xxu_. rtl2831u_foo() => rtl28xxu_foo() rtl2832u_foo() => rtl28xxu_foo() Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] rtl28xxu: add heuristic to detect chip typeAntti Palosaari2015-02-03
| | | | | | | | | Detect automatically whether chip is old RTL2831U or newer RTL2832U/RTL2832P. Detection is based I2C command that is found only from newer RTL2832U models. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] rtl28xxu: move usb buffers to stateAntti Palosaari2015-02-03
| | | | | | | | Buffer needed for USB control message is small so move it to state and get rid of alloc/free used for each control message. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] rtl28xxu: fix loggingAntti Palosaari2015-02-03
| | | | | | | | Pass correct device pointer to dev_* logging in order to print module name and bus id correctly. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] rtl28xxu: rename state variable 'priv' to 'dev'Antti Palosaari2015-02-03
| | | | | | | | I prefer dev over priv and I want keep all my drivers in line with that. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] rtl28xxu: do not refcount rtl2832_sdr moduleAntti Palosaari2015-02-03
| | | | | | | | | | This driver, rtl28xxu, offers frontend service for rtl2832_sdr module, thus we are producer and rtl2832_sdr module is consumer. Due to that, reference counting should be done in way rtl2832_sdr takes refrence to rtl28xxu. Remove wrong refcount. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] rtl28xxu: simplify FE callback handlingAntti Palosaari2015-02-03
| | | | | | | | Logic is so simple that there is no idea to separate tuner selection to own function, instead do it in a callback and get rid of one function. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] rtl28xxu: fix DVB FE callbackAntti Palosaari2015-02-03
| | | | | | | | | | | DVB FE callback functionality went broken after I moved tuners to demod muxed I2C adapter. That happens because driver state was carried by I2C adapter and when mux is used there is one adapter more in a chain. USB adapter <-> I2C adapter <-> muxed I2C adapter Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] rtl28xxu: use master I2C adapter for slave demodsAntti Palosaari2015-02-03
| | | | | | | | | Both mn88472 and mn88473 slave demods are connected to master I2C bus, not the bus behind master demod I2C gate like tuners. Use correct bus. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] rtl28xxu: switch SDR module to platform driverAntti Palosaari2015-02-03
| | | | | | | | RTL2832 SDR module implements kernel platform driver. Change old binding to that one. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] rtl28xxu: add support for RTL2832U/RTL2832 PID filterAntti Palosaari2015-02-03
| | | | | | | | RTL2832 demod integrated into RTL2832U has PID filter. PID filtering is provided by rtl2832 demod driver. Add support for it. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] rtl28xxu: use demod mux I2C adapter for every tunerAntti Palosaari2015-02-03
| | | | | | | | | Tuners are connected to demod I2C adapter. Use that muxed adapter for each tuner. That allows us to get rid of hackish FE gate control solution. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] rtl28xxu: use platform data config for rtl2832 demodAntti Palosaari2015-02-03
| | | | | | | | Use platform data configuration for rtl2832 demod driver. Old configuration are still left as it is used for rtl2832_sdr driver. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] rtl28xxu: use rtl2832 demod callbacks accessing its resourcesAntti Palosaari2015-02-03
| | | | | | | | Switch demod resource use from exported symbols to callbacks its provides. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] rtl28xxu: add support for RTL2831U/RTL2830 PID filterAntti Palosaari2015-02-02
| | | | | | | | RTL2830 demod integrated to RTL2831U has PID filter. PID filtering is provided by rtl2830 demod driver. Add support for it. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] rtl28xxu: use I2C binding for RTL2830 demod driverAntti Palosaari2015-02-02
| | | | | | | rtl2830 driver supports now I2C model too. Start using it. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] dvb-usb-v2: add pointer to 'struct usb_interface' for driver usageAntti Palosaari2015-02-02
| | | | | | | | | Top level pointer on USB probe is struct usb_interface *. Add that pointer to struct dvb_usb_device that drivers could use it, for dev_* logging and more. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: au0828 - convert to use videobuf2Shuah Khan2015-02-02
| | | | | | | | | | | | | | | | | | Convert au0828 to use videobuf2. Tested with NTSC. Tested video and vbi devices with xawtv, tvtime, and vlc. Ran v4l2-compliance to ensure there are no failures. Video compliance test results summary: Total: 75, Succeeded: 75, Failed: 0, Warnings: 18 Vbi compliance test results summary: Total: 75, Succeeded: 75, Failed: 0, Warnings: 0 Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> Reviewed-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: fix au0828 compile error from au0828_boards initializationShuah Khan2015-02-02
| | | | | | | | | | | | | | au0828 picked up UNSET from videobuf-core.h and fails to compile if videobuf-core.h isn't included. Change it to use -1U instead to fix the problem. drivers/media/usb/au0828/au0828-cards.c:47:17: error: ‘UNSET’ undeclared here (not in a function) .tuner_type = UNSET, Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: fix au0828_analog_register() to not free au0828_devShuah Khan2015-02-02
| | | | | | | | | | | | | | au0828_analog_register() frees au0828_dev when it fails to locate isoc endpoint. au0828_usb_probe() continues with dvb and rc probe and registration assuming dev is still valid. When au0828_analog_register() fails to locate isoc endpoint, it should return without free'ing au0828_dev. Otherwise, the probe will fail as dev is null when au0828_dvb_register() is called. Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] siano: fix Kconfig dependenciesArnd Bergmann2015-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The USB and MMC front-ends to the siano driver both only make sense when combined with the SMS_SIANO_MDTV driver. That driver already requires RC_CORE to not be a module, so we also need to add that dependency here. drivers/built-in.o: In function `smssdio_remove': :(.text+0x155bd8): undefined reference to `smscore_putbuffer' :(.text+0x155bdc): undefined reference to `smscore_unregister_device' drivers/built-in.o: In function `smssdio_interrupt': :(.text+0x155e4c): undefined reference to `smsendian_handle_rx_message' :(.text+0x155e50): undefined reference to `smscore_onresponse' :(.text+0x155e54): undefined reference to `smscore_getbuffer' :(.text+0x155e58): undefined reference to `smscore_putbuffer' drivers/built-in.o: In function `smssdio_sendrequest': :(.text+0x155f20): undefined reference to `smsendian_handle_tx_message' drivers/built-in.o: In function `smssdio_probe': :(.text+0x15610c): undefined reference to `sms_get_board' :(.text+0x156114): undefined reference to `smscore_register_device' :(.text+0x156118): undefined reference to `smscore_set_board_id' :(.text+0x156128): undefined reference to `smscore_unregister_device' :(.text+0x156140): undefined reference to `smscore_start_device' Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] pvrusb2: use msecs_to_jiffies for conversionNicholas Mc Guire2015-02-02
| | | | | | | | This is only an API consolidation and should make things more readable Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] cx231xx: don't use dev it not allocatedMauro Carvalho Chehab2015-02-02
| | | | | | | | | | | | | | | changeset 5eeb3014827f added a fixup at the error check code. However, it introduced a new error: drivers/media/usb/cx231xx/cx231xx-cards.c:1586 cx231xx_usb_probe() error: we previously assumed 'dev' could be null (see line 1430) This happens when dev = kmalloc() fails. So, instead of relying on it to succeed, just change the parameter of clear_bit() from 'dev->devno' to 'nr'. Cc: Alexey Khoroshilov <khoroshilov@ispras.ru> Cc: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] cx231xx: fix usbdev leak on failure paths in cx231xx_usb_probe()Alexey Khoroshilov2015-02-02
| | | | | | | | | | | | | | | | | Commit b7085c086475 ("cx231xx: convert from pr_foo to dev_foo") moves usb_get_dev(interface_to_usbdev(interface)) to the beginning of cx231xx_usb_probe() to use udev->dev in dev_err(), but it does not make sure usbdev is put on all failure paths. Later dev_err(udev->dev) was replaced by dev_err(d). So the patch moves usb_get_dev() below (before the first use) and fixes another failure path. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>