aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-11-03Merge branch 'mlx5-fixes'David S. Miller
Or Gerlitz says: ==================== Mellanox mlx5e driver update, Nov 3 2015 This series contains bunch of small fixes to the mlx5e driver from Achiad. Changes from V0: - removed the driver patch that dealt with IRQ affinity changes during NAPI poll, as this is a generic problem which needs generic solution. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-03net/mlx5e: Fix LSO vlan insertionAchiad Shochat
Consider vlan insertion impact on headers copy size also for LSO packets. Signed-off-by: Achiad Shochat <achiad@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-03net/mlx5e: Re-eanble client vlan TX accelerationAchiad Shochat
This reverts commit cd58c714acb9 "net/mlx5e: Disable client vlan TX acceleration". Bring back client vlan insertion offload, the original performance issue was found and fixed in the next patch. Signed-off-by: Achiad Shochat <achiad@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-03net/mlx5e: Return error in case mlx5e_set_features() failsAchiad Shochat
In case mlx5e_set_features() fails, return the failure status rather than 0. Signed-off-by: Achiad Shochat <achiad@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-03net/mlx5e: Don't allow more than max supported channelsAchiad Shochat
Consider MLX5E_MAX_NUM_CHANNELS @ethtool set/get_channels Signed-off-by: Achiad Shochat <achiad@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-03net/mlx5_core: Use the the real irqn in eq->irqnAchiad Shochat
Instead of storing the msix array index in eq->irqn (vecidx), store the real irq number. Signed-off-by: Achiad Shochat <achiad@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-03net/mlx5e: Wait for RX buffers initialization in a more proper mannerAchiad Shochat
Use jiffies rather than wait loop with msleep(). The wait loop didn't take into consideration time when the process was not executing. Signed-off-by: Achiad Shochat <achiad@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-03net/mlx5e: Avoid NULL pointer access in case of configuration failureAchiad Shochat
In case a configuration operation that involves closing and re-opening resources (e.g RX/TX queue size change) fails at the re-opening stage these resources will remain closed. So when executing (following) configuration operations (e.g ifconfig down) we cannot assume that these resources are available. Signed-off-by: Achiad Shochat <achiad@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-03cfg80211: allow AID/listen interval changes for unassociated stationAyala Beker
Currently, cfg80211 rejects updates of AID and listen interval parameters for existing entries. This information is known only at association stage and as a result it's impossible to update entries that were added unassociated. Fix this by allowing updates of these properies for stations that the driver (or mac80211) assigned unassociated state. This then fixes mac80211's use of NL80211_FEATURE_FULL_AP_CLIENT_STATE. Signed-off-by: Ayala Beker <ayala.beker@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-11-03mac80211: document sleep requirements for channel context opsChaitanya T K
Channel context driver operations can sleep, so add might_sleep() and document this. Signed-off-by: Chaitanya T K <chaitanya.mgit@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-11-03mac80211: further improve "no supported rates" warningJohannes Berg
Allow distinguishing the non-station case from the case of a station without rates, by using -1 for the non-station case. This value cannot be reached with a station since that many legacy rates don't exist. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-11-03mac80211: treat bad WMM parameters more gracefullyJohannes Berg
As WMM is required for HT/VHT operation, treat bad WMM parameters more gracefully by falling back to default parameters instead of not using WMM assocation. This makes it possible to still use HT or VHT, although potentially with reduced quality of service due to unintended WMM parameters. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-11-03mac80211: fixup AIFSN instead of disabling WMMEmmanuel Grumbach
Disabling WMM has a huge impact these days. It implies that HT and VHT will be disabled which means that the throughput will be drammatically reduced. Since the AIFSN is a transmission parameter, we can play a bit and fix it up to make it compliant with the 802.11 specification which requires it to be at least 2. Increasing it from 1 to 2 will slightly reduce the likelyhood to get a transmission opportunity compared to other clients that would accept to set AIFSN=1, but at least it will allow HT and VHT which is a huge gain. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-11-03mac80211: make enable_qos parameter to ieee80211_set_wmm_default()Johannes Berg
The function currently determines this value, for use in bss_info.qos, based on the interface type itself. Make it a parameter instead and set it with the same logic for now. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-11-03cfg80211/mac80211: clarify RSSI CQM reporting requirementsJohannes Berg
The previous patch changed mac80211 to always report an event after a CQM RSSI reconfiguration. Document that as expected behaviour in both the cfg80211 and mac80211 API. Currently, iwlmvm already implements that behaviour; the other drivers implementing CQM RSSI events may have to be changed. This behaviour lets userspace know what the current state is without relying on querying the data which is racy. Reviewed-by: Sharon, Sara <sara.sharon@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-11-03mac80211: fix crash on mesh local link ID generation with VIFsMatthias Schiffer
llid_in_use needs to be limited to stations of the same VIF, otherwise it will cause a NULL deref as the sta_info of non-mesh-VIFs don't have sta->mesh set. Steps to reproduce: modprobe mac80211_hwsim channels=2 iw phy phy0 interface add ibss0 type ibss iw phy phy0 interface add mesh0 type mp iw phy phy1 interface add ibss1 type ibss iw phy phy1 interface add mesh1 type mp ip link set ibss0 up ip link set mesh0 up ip link set ibss1 up ip link set mesh1 up iw dev ibss0 ibss join foo 2412 iw dev ibss1 ibss join foo 2412 # Ensure that ibss0 and ibss1 are actually associated; I often need to # leave and join the cell on ibss1 a second time. iw dev mesh0 mesh join bar iw dev mesh1 mesh join bar # crash Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-11-03mac80211: TDLS: add proper HT-oper IEArik Nemtsov
When 11n peers performs a TDLS connection on a legacy BSS, the HT operation IE must be specified according to IEEE802.11-2012 section 9.23.3.2. Otherwise HT-protection is compromised and the medium becomes noisy for both the TDLS and the BSS links. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-11-03mac80211: don't reconfigure sched scan in case of wowlanEliad Peller
Scheduled scan has to be reconfigured only if wowlan wasn't configured, since otherwise it should continue to run (with the 'any' trigger) or be aborted. The current code will end up asking the driver to start a new scheduled scan without stopping the previous one, and leaking some memory (from the previous request.) Fix this by doing the abort/restart under the proper conditions. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-11-03mac80211: call drv_stop only if driver is startedEliad Peller
If drv_start() fails during hw_restart, all the running interfaces are being closed/stopped, which results in drv_stop() being called, although the driver was never started successfully. This might cause drivers to perform operations on uninitialized memory (as they assume it was initialized on drv_start) Consider the local->started flag, and call the driver's stop() op only if drv_start() succeeded before. Move drv_start() and drv_stop() to driver-ops.c, as they are no longer simple wrappers. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-11-03mac80211: Remove WARN_ON_ONCE in ieee80211_recalc_smpsAndrei Otcheretianski
The recalc_smps work can run after the station disassociates. At this stage we already released the channel, but the work will be cancelled only when the interface stops. In this scenario we can hit the warning in ieee80211_recalc_smps, so just remove it. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-11-03mac80211: use freezable workqueue for restart workEliad Peller
Requesting hw restart during suspend might result in the restart work being executed after mac80211 and the hw are suspended. Solve the race by simply scheduling the restart work on a freezable workqueue. Note that there can be some cases of reconfiguration on resume (besides the hardware restart): * wowlan is not configured - All the interfaces removed were removed on suspend, and drv_stop() was called. At this point the driver shouldn't expect for hw_restart anyway, so we can simply cancel it (on resume). * wowlan is configured, drv_resume() == 1 There is no definitive expected behavior in this case, as each driver might have different expectations (e.g. setting some flags on suspend/restart vs. not handling spurious recovery). For now, simply let the hw_restart work run again after resume, and hope the driver will handle it well (or at least initiate another hw restart). Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-11-03mac80211: Fix local deauth while associatingAndrei Otcheretianski
Local request to deauthenticate wasn't handled while associating, thus the association could continue even when the user space required to disconnect. Cc: stable@vger.kernel.org Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-11-03mac80211: allow null chandef in tracingArik Nemtsov
In TDLS channel-switch operations the chandef can sometimes be NULL. Avoid an oops in the trace code for these cases and just print a chandef full of zeros. Cc: stable@vger.kernel.org Fixes: a7a6bdd0670fe ("mac80211: introduce TDLS channel switch ops") Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-11-03nl80211: Fix potential memory leak from parse_acl_dataOla Olsson
If parse_acl_data succeeds but the subsequent parsing of smps attributes fails, there will be a memory leak due to early returns. Fix that by moving the ACL parsing later. Cc: stable@vger.kernel.org Fixes: 18998c381b19b ("cfg80211: allow requesting SMPS mode on ap start") Signed-off-by: Ola Olsson <ola.olsson@sonymobile.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-11-03mac80211: fix divide by zero when NOA updateJanusz.Dziedzic@tieto.com
In case of one shot NOA the interval can be 0, catch that instead of potentially (depending on the driver) crashing like this: divide error: 0000 [#1] SMP [...] Call Trace: <IRQ> [<ffffffffc08e891c>] ieee80211_extend_absent_time+0x6c/0xb0 [mac80211] [<ffffffffc08e8a17>] ieee80211_update_p2p_noa+0xb7/0xe0 [mac80211] [<ffffffffc069cc30>] ath9k_p2p_ps_timer+0x170/0x190 [ath9k] [<ffffffffc070adf8>] ath_gen_timer_isr+0xc8/0xf0 [ath9k_hw] [<ffffffffc0691156>] ath9k_tasklet+0x296/0x2f0 [ath9k] [<ffffffff8107ad65>] tasklet_action+0xe5/0xf0 [...] Cc: stable@vger.kernel.org [3.16+, due to d463af4a1c34 using it] Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-11-03leds: 88pm860x: add missing of_node_putJulia Lawall
for_each_child_of_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr): // <smpl> @@ local idexpression n; expression e,r; @@ for_each_child_of_node(r,n) { ... ( of_node_put(n); | e = n | + of_node_put(n); ? break; ) ... } ... when != n // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2015-11-03leds: bcm6328: add missing of_node_putJulia Lawall
for_each_available_child_of_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr): // <smpl> @@ expression root,e; local idexpression child; @@ for_each_available_child_of_node(root, child) { ... when != of_node_put(child) when != e = child ( return child; | + of_node_put(child); ? return ...; ) ... } // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2015-11-03leds: bcm6358: add missing of_node_putJulia Lawall
for_each_available_child_of_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr): // <smpl> @@ expression root,e; local idexpression child; @@ for_each_available_child_of_node(root, child) { ... when != of_node_put(child) when != e = child ( return child; | + of_node_put(child); ? return ...; ) ... } // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2015-11-03powerpc/powernv: add missing of_node_putJulia Lawall
for_each_child_of_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr): // <smpl> @@ expression root,e; local idexpression child; @@ for_each_child_of_node(root, child) { ... when != of_node_put(child) when != e = child ( return child; | + of_node_put(child); ? return ...; ) ... } // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2015-11-03leds: leds-wrap.c: Use devm_led_classdev_registerFida Mohammad
Use of resource managed function devm_led_classdev_register to make initialization path simpler. Also removed redundant remove function. Signed-off-by: Fida Mohammad <fmthoker@gmail.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2015-11-03leds: aat1290: Fix property naming of flash-timeout-usIngi Kim
flash-timeout-us property name is changed to flash-max-timeout-us. This patch fixes that name. Signed-off-by: Ingi Kim <ingi2.kim@samsung.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2015-11-03leds: leds-net48xx: Use devm_led_classdev_registerMuhammad Falak R Wani
Use devm_led_classdev_register instead of led_classdev_register, removing the redundant net48xx_led_remove function. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2015-11-03leds: leds-menf21bmc.c: Use devm_led_class_registerMuhammad Falak R Wani
Use resource-managed function devm_led_classdev_register instead of led_classdev_register, consequently remove redundant menf21bmc_led_remove function. Also drop the unneeded label err_free_leds. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2015-11-03leds: leds-locomo.c: Use devm_led_classdev_registerFida Mohammad
Use resource managed function devm_led_classdev_register to make initialisation path simpler. Also removed redundant led_classdev_unregister function. Signed-off-by: Fida Mohammad <fmthoker@gmail.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2015-11-03leds: leds-gpio: add shutdown functionHeiko Schocher
add a shutdown function for setting the gpio-leds into off state when shuting down. Signed-off-by: Heiko Schocher <hs@denx.de> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2015-11-03Documentation: leds: update DT bindings for leds-bcm6328Álvaro Fernández Rojas
This patch adds latest DT bindings for leds-bcm6328 init register configuration. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2015-11-03leds-bcm6328: add more init configuration optionsÁlvaro Fernández Rojas
This patch adds more init register configuration options: - Serial LEDs multiplexing. - Serial LEDs clock signal low/high polarity. - Serial LEDs data signal low/high polarity. - Serial LEDs shift direction inverted/normal. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2015-11-03leds-bcm6328: simplify and improve default-state handlingÁlvaro Fernández Rojas
This patch simplifies and improves the code related to default-state handling. It also changes the code to power off the LEDs by default. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2015-11-03leds-bcm6328: print invalid LEDÁlvaro Fernández Rojas
Print invalid LED instead of warning only about maximum LED value. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2015-11-03leds: netxbig: set led_classdev max_brightnessSimon Guinot
This patch sets the led_classdev max_brightness to the maximum level value supported by hardware. This allows to get rid of the brightness conversion operation (from software [0:LED_FULL] to hardware ranges) in brightness_set(). Signed-off-by: Simon Guinot <simon.guinot@sequanux.org> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2015-11-03leds: netxbig: convert to use the devm_ functionsSimon Guinot
This patch converts the leds-netxbig driver to use the devres functions devm_gpio_request_one() and devm_led_classdev_register(). This allows to simplify the code a bit. Signed-off-by: Simon Guinot <simon.guinot@sequanux.org> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2015-11-03ARM: mvebu: remove static LED setup for netxbig boardsSimon Guinot
Since DT support is now available for the LEDs found on the LaCie netxbig boards (Kirkwood-based), then the old-fashion netxbig board setup file is no longer needed. This patch removes this file. Signed-off-by: Simon Guinot <simon.guinot@sequanux.org> Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2015-11-03ARM: Kirkwood: add LED DT entries for netxbig boardsSimon Guinot
This patch adds DT entries for the LEDs found on the Kirkwood-based LaCie boards 2Big and 5Big Network v2. Signed-off-by: Simon Guinot <simon.guinot@sequanux.org> Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2015-11-03leds: netxbig: add device tree bindingSimon Guinot
This patch adds device tree support for the netxbig LEDs. This also introduces a additionnal DT binding for the GPIO extension bus (netxbig-gpio-ext) used to configure the LEDs. Since this bus could also be used to control other devices, then it seems more suitable to have it in a separate DT binding. Signed-off-by: Simon Guinot <simon.guinot@sequanux.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2015-11-03leds: triggers: add invert to heartbeatJiri Prchal
This patch adds possibility to invert heartbeat blinking. The inverted LED is more time ON then OFF. It's because it looks better when the heartbeat LED is next to other LED which is most time ON. The invert value is exported same way via sysfs in file invert like oneshot. I get inspiration from this trigger. Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2015-11-03leds: core: Move LED core callbacks out of led-class.cJacek Anaszewski
Since the API for controlling LED brightness and blinking is defined in the LED core, move the related timer and work callbacks to the led-core.c, and initialize them through a new led_core_init API. Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Acked-by: Andrew Lunn <andrew@lunn.ch> Acked-by: Pavel Machek <pavel@ucw.cz>
2015-11-03LED/MIPS: Move SEAD3 LED driver to where it belongs.Ralf Baechle
Fixes the following randconfig problem leds-sead3.c:(.text+0x7dc): undefined reference to `led_classdev_unregister' leds-sead3.c:(.text+0x7e8): undefined reference to `led_classdev_unregister' Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Cc: Bryan Wu <cooloney@gmail.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Markos Chandras <markos.chandras@imgtec.com> Cc: linux-leds@vger.kernel.org Cc: linux-mips@linux-mips.org Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2015-11-03leds: leds-ipaq-micro: Fix coding style issuesMuhammad Falak R Wani
Spaces at the starting of a line are removed, indentation using tab, instead of space. Also, line width of more than 80 characters is also taken care of. Two warnings are left alone to aid better readability. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2015-11-03leds: leds-ipaq-micro: Use devm_led_classdev_registerMuhammad Falak R Wani
Use of resource-managed function devm_led_classdev_register instead of led_classdev_register is preferred, consequently remove redundant function micro_leds_remove. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2015-11-03leds: leds-ot200: Use devm_led_classdev_registerMuhammad Falak R Wani
Use resource-managed function devm_led_classdev_register instead of led_classdev_register to make the error path simpler. The goto is replaced with direct return, unneeded label err is dropped. Also, remove redundant ot200_led_remove. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>