Re: [PATCH 01/20] coresight: Fix memory leak in coresight_register

2018-06-05 Thread Arvind Yadav
x27;dev -> release' and also free other kobject resources. If you will see the coresight_device_release. There we are releasing all allocated memory. Still if you call kfree() again then it'll be redundancy. ~arvind Fixes: commit 6403587a930c ("coresight: use put_device() instead of kf

Re: [PATCH v2] staging: greybus: Use gpio_is_valid()

2018-05-02 Thread Arvind Yadav
On Wednesday 02 May 2018 03:27 PM, Johan Hovold wrote: On Wed, May 02, 2018 at 03:15:05PM +0530, Arvind Yadav wrote: On Wednesday 02 May 2018 02:13 PM, Johan Hovold wrote: On Sat, Apr 28, 2018 at 10:05:39AM +0530, Arvind Yadav wrote: Replace the manual validity checks for the GPIO with the

Re: [PATCH v2] staging: greybus: Use gpio_is_valid()

2018-05-02 Thread Arvind Yadav
On Wednesday 02 May 2018 02:13 PM, Johan Hovold wrote: On Sat, Apr 28, 2018 at 10:05:39AM +0530, Arvind Yadav wrote: Replace the manual validity checks for the GPIO with the gpio_is_valid(). Signed-off-by: Arvind Yadav --- chnage in v2 : Returning invalid gpio as error instead

[PATCH v2] staging: greybus: Use gpio_is_valid()

2018-04-27 Thread Arvind Yadav
Replace the manual validity checks for the GPIO with the gpio_is_valid(). Signed-off-by: Arvind Yadav --- chnage in v2 : Returning invalid gpio as error instead of -ENODEV. drivers/staging/greybus/arche-platform.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

Re: [greybus-dev] [PATCH] staging: greybus: Use gpio_is_valid()

2018-04-27 Thread Arvind Yadav
On Friday 27 April 2018 05:47 PM, Alex Elder wrote: On 04/27/2018 05:52 AM, Arvind Yadav wrote: Replace the manual validity checks for the GPIO with the gpio_is_valid(). I haven't looked through the code paths very closely, but I think that get_named_gpio() might return -EPROBE_DEFER,

[PATCH 0/2] Use gpio_is_valid()

2018-04-27 Thread Arvind Yadav
Replace the manual validity checks for the GPIO with the gpio_is_valid(). Arvind Yadav (2): [PATCH 1/2] [media] platform: Use gpio_is_valid() [PATCH 2/2] [media] sta2x11: Use gpio_is_valid() and remove unnecessary check drivers/media/pci/sta2x11/sta2x11_vip.c | 31

[PATCH 1/2] [media] platform: Use gpio_is_valid()

2018-04-27 Thread Arvind Yadav
Replace the manual validity checks for the GPIO with the gpio_is_valid(). Signed-off-by: Arvind Yadav --- drivers/media/platform/via-camera.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/via-camera.c b/drivers/media/platform/via-camera.c index

[PATCH 2/2] [media] sta2x11: Use gpio_is_valid() and remove unnecessary check

2018-04-27 Thread Arvind Yadav
y. Because vip_gpio_reserve() is also checking for valid gpio pin. So removed extra error checking for gpio 'reset_pin'. Signed-off-by: Arvind Yadav --- drivers/media/pci/sta2x11/sta2x11_vip.c | 31 +++ 1 file changed, 15 insertions(+), 16 deletions(-) diff -

[PATCH] spi: mpc52xx: Use gpio_is_valid()

2018-04-27 Thread Arvind Yadav
Replace the manual validity checks for the GPIO with the gpio_is_valid(). Signed-off-by: Arvind Yadav --- drivers/spi/spi-mpc52xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-mpc52xx.c b/drivers/spi/spi-mpc52xx.c index e8b59ce..0e55784 100644 --- a

[PATCH] staging: greybus: Use gpio_is_valid()

2018-04-27 Thread Arvind Yadav
Replace the manual validity checks for the GPIO with the gpio_is_valid(). Signed-off-by: Arvind Yadav --- drivers/staging/greybus/arche-platform.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus

[PATCH 2/3] ASoC: tpa6130a2: Use gpio_is_valid()

2018-04-27 Thread Arvind Yadav
Replace the manual validity checks for the GPIO with the gpio_is_valid(). Signed-off-by: Arvind Yadav --- sound/soc/codecs/tpa6130a2.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/tpa6130a2.c b/sound/soc/codecs/tpa6130a2.c index 616cd4b..18f32b9

[PATCH 1/3] ASoC: tlv320dac33: Use gpio_is_valid()

2018-04-27 Thread Arvind Yadav
Replace the manual validity checks for the GPIO with the gpio_is_valid(). Signed-off-by: Arvind Yadav --- sound/soc/codecs/tlv320dac33.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c index a957eae

[PATCH 3/3] ASoC: samsung: Use gpio_is_valid()

2018-04-27 Thread Arvind Yadav
Replace the manual validity checks for the GPIO with the gpio_is_valid(). Signed-off-by: Arvind Yadav --- sound/soc/samsung/s3c24xx_simtec.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/samsung/s3c24xx_simtec.c b/sound/soc/samsung/s3c24xx_simtec.c

[PATCH 0/3] ASoC: Use gpio_is_valid()

2018-04-27 Thread Arvind Yadav
Replace the manual validity checks for the GPIO with the gpio_is_valid(). Arvind Yadav (3): [PATCH 1/3] ASoC: tlv320dac33: Use gpio_is_valid() [PATCH 2/3] ASoC: tpa6130a2: Use gpio_is_valid() [PATCH 3/3] ASoC: samsung: Use gpio_is_valid() sound/soc/codecs/tlv320dac33.c | 10

[PATCH] mm: memory_hotplug: use put_device() if device_register fail

2018-04-26 Thread Arvind Yadav
if device_register() returned an error. Always use put_device() to give up the initialized reference and release allocated memory. Signed-off-by: Arvind Yadav --- drivers/base/memory.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/base/memory.c b/drivers

[PATCH] sparc: vio: use put_device() instead of kfree()

2018-04-25 Thread Arvind Yadav
Never directly free @dev after calling device_register(), even if it returned an error. Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav --- arch/sparc/kernel/vio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sparc/kernel

[PATCH] IA64: tiocx: use put_device() instead of kfree()

2018-04-25 Thread Arvind Yadav
Never directly free @dev after calling device_register(), even if it returned an error. Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav --- arch/ia64/sn/kernel/tiocx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/ia64/sn

[PATCH] ARM: locomo: use put_device() instead of kfree()

2018-04-25 Thread Arvind Yadav
Never directly free @dev after calling device_register(), even if it returned an error. Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav --- arch/arm/common/locomo.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/arch/arm

[PATCH] HID: wacom: Release device resource data obtained by devres_alloc()

2018-04-24 Thread Arvind Yadav
Free device resource data, if __wacom_devm_sysfs_create_group is not successful. Signed-off-by: Arvind Yadav --- drivers/hid/wacom_sys.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c index b54ef1f..ee7a37e 100644 --- a

[PATCH] PM / devfreq: use put_device() instead of kfree()

2018-03-30 Thread Arvind Yadav
Never directly free @dev after calling device_register() or device_unregister(), even if device_register() returned an error. Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav --- drivers/devfreq/devfreq.c | 4 +++- 1 file changed, 3 insertions(+), 1

[PATCH] hid: intel-ish-hid: use put_device() instead of kfree()

2018-03-30 Thread Arvind Yadav
Never directly free @dev after calling device_register(), even if it returned an error. Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav --- drivers/hid/intel-ish-hid/ishtp/bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[RFT] media: hdpvr: Fix Double kfree() error

2018-03-20 Thread Arvind Yadav
v4l2_device_release => hdpvr_device_release (CALLBACK) => kfree(dev) error_free_dev: kfree(dev) Signed-off-by: Arvind Yadav --- reported by: Dan Carpenter drivers/media/usb/hdpvr/hdpvr-core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/med

[PATCH] coresight: use put_device() instead of kfree()

2018-03-18 Thread Arvind Yadav
Never directly free @dev after calling device_register(), even if it returned an error. Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav --- drivers/hwtracing/coresight/coresight.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH] vmbus: use put_device() if device_register fail

2018-03-17 Thread Arvind Yadav
if device_register() returned an error. Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav --- drivers/hv/vmbus_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index bc65c4d..25da2f3 100644 --- a

Re: [PATCH 2/2 v2] mtd: ubi: use put_device() if device_register fail

2018-03-15 Thread Arvind Yadav
On Thursday 15 March 2018 01:25 PM, Richard Weinberger wrote: Am Donnerstag, 15. März 2018, 08:20:31 CET schrieb Arvind Yadav: if device_register() returned an error! Always use put_device() to give up the reference initialized. Like DaveM said, there is no need to shout and use "!&

[PATCH 2/2 v2] mtd: ubi: use put_device() if device_register fail

2018-03-15 Thread Arvind Yadav
if device_register() returned an error! Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav --- change in v2: Fix use-after-free bug. move put_device() after cdev_del(). drivers/mtd/ubi/vmt.c | 1 + 1 file changed, 1 insertion(+) diff --git a

Re: [PATCH 2/2] mtd: ubi: use put_device() if device_register fail

2018-03-14 Thread Arvind Yadav
On Thursday 15 March 2018 12:55 AM, Richard Weinberger wrote: Am Mittwoch, 14. März 2018, 19:56:52 CET schrieb Boris Brezillon: On Fri, 9 Mar 2018 16:20:49 +0530 Arvind Yadav wrote: if device_register() returned an error! Always use put_device() to give up the reference initialized

[PATCH 1/2] misc: mic: Release reference count and memory for VOP device

2018-03-12 Thread Arvind Yadav
Never directly free @dev after calling device_register(), even if it returned an error! Always use put_device() to give up the reference initialized. Release allocated memory for vop device in vop_release_dev(). Signed-off-by: Arvind Yadav --- drivers/misc/mic/bus/vop_bus.c | 6 -- 1 file

[PATCH 2/2] misc: ocxl: use put_device() instead of device_unregister()

2018-03-12 Thread Arvind Yadav
if device_register() returned an error! Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav --- drivers/misc/ocxl/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/ocxl/pci.c b/drivers/misc/ocxl/pci.c index 0051d9e

[PATCH 0/2] misc: use put_device() instead of kfree()

2018-03-12 Thread Arvind Yadav
Never directly free @dev after calling device_register(), even if it returned an error! Always use put_device() to give up the reference initialized. Arvind Yadav (2): [PATCH 1/2] misc: mic: Release reference count and memory for VOP device [PATCH 2/2] misc: ocxl: use put_device() instead of

Re: [PATCH 0/2] mtd: use put_device() if device_register fail

2018-03-11 Thread Arvind Yadav
On Monday 12 March 2018 01:05 AM, Richard Weinberger wrote: Am Freitag, 9. März 2018, 11:50:47 CET schrieb Arvind Yadav: if device_register() returned an error! Always use put_device() to give up the reference initialized. Arvind Yadav (2): [PATCH 1/2] mtd: use put_device() if

[PATCH 0/4] driver core: use put_device() instead of kfree()

2018-03-10 Thread Arvind Yadav
Never directly free @dev after calling device_register(), even if it returned an error! Always use put_device() to give up the reference initialized. Arvind Yadav (4): [PATCH 1/4] base: soc: use put_device() instead of kfree() [PATCH 2/4] driver core: platform: use put_device() if

[PATCH 1/4] base: soc: use put_device() instead of kfree()

2018-03-10 Thread Arvind Yadav
Never directly free @dev after calling device_register(), even if it returned an error! Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav --- drivers/base/soc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/base/soc.c b/drivers/base/soc.c

[PATCH 4/4] driver core: cpu: use put_device() if device_register fail

2018-03-10 Thread Arvind Yadav
if device_register() returned an error! Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav --- drivers/base/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c index d21a2d9..2da998b 100644

[PATCH 3/4] driver core: node: use put_device() if device_register fail

2018-03-10 Thread Arvind Yadav
if device_register() returned an error! Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav --- drivers/base/node.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/base/node.c b/drivers/base/node.c index ee090ab..c5f81fc

[PATCH 2/4] driver core: platform: use put_device() if device_register fail

2018-03-10 Thread Arvind Yadav
if device_register() returned an error! Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav --- drivers/base/platform.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/base/platform.c b/drivers/base/platform.c index f1bf7b3

[PATCH 2/2] mtd: ubi: use put_device() if device_register fail

2018-03-09 Thread Arvind Yadav
if device_register() returned an error! Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav --- drivers/mtd/ubi/vmt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mtd/ubi/vmt.c b/drivers/mtd/ubi/vmt.c index 3fd8d7f..db85b68 100644 --- a

[PATCH 1/2] mtd: use put_device() if device_register fail

2018-03-09 Thread Arvind Yadav
if device_register() returned an error! Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav --- drivers/mtd/mtdcore.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index 28553c8..4d77ca2 100644 --- a

[PATCH 0/2] mtd: use put_device() if device_register fail

2018-03-09 Thread Arvind Yadav
if device_register() returned an error! Always use put_device() to give up the reference initialized. Arvind Yadav (2): [PATCH 1/2] mtd: use put_device() if device_register fail [PATCH 2/2] mtd: ubi: use put_device() if device_register fail drivers/mtd/mtdcore.c | 1 + drivers/mtd/ubi/vmt.c

[PATCH] net: hns: use put_device() if device_register fail

2018-03-09 Thread Arvind Yadav
if device_register() returned an error! Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav --- drivers/net/ethernet/hisilicon/hns/hnae.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns/hnae.c b

[PATCH] ntb_transport: use put_device() instead of kfree()

2018-03-09 Thread Arvind Yadav
Never directly free @dev after calling device_register(), even if it returned an error! Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav --- drivers/ntb/ntb_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ntb

[PATCH] pwm: sysfs: use put_device() instead of kfree()

2018-03-08 Thread Arvind Yadav
Never directly free @dev after calling device_register(), even if it returned an error! Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav --- drivers/pwm/sysfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pwm/sysfs.c b

[PATCH 0/2] rpmsg: use put_device() if device_register fail

2018-03-08 Thread Arvind Yadav
if device_register() returned an error! Always use put_device() to give up the reference initialized. unregister device for other return error. Arvind Yadav (2): [PATCH 1/2] rpmsg: glink: use put_device() if device_register fail [PATCH 2/2] rpmsg: smd: use put_device() if device_register

[PATCH 1/2] rpmsg: glink: use put_device() if device_register fail

2018-03-08 Thread Arvind Yadav
if device_register() returned an error! Always use put_device() to give up the reference initialized. And unregister device for other return error. Signed-off-by: Arvind Yadav --- drivers/rpmsg/qcom_glink_smem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/rpmsg

[PATCH 2/2] rpmsg: smd: use put_device() if device_register fail

2018-03-08 Thread Arvind Yadav
if device_register() returned an error! Always use put_device() to give up the reference initialized. unregister device for other return error. Signed-off-by: Arvind Yadav --- drivers/rpmsg/qcom_smd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/rpmsg/qcom_smd.c

[PATCH v3] ssb: use put_device() if device_register fail

2018-03-07 Thread Arvind Yadav
Never directly free @dev after calling device_register(), even if it returned an error! Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav --- changes in v2: Removed kfree() call for @dev. changes in v3: Add put_device() in place

[PATCH v2] ssb: use put_device() if device_register fail

2018-03-07 Thread Arvind Yadav
Never directly free @dev after calling device_register(), even if it returned an error! Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav --- changes in v2: Removed kfree() call for @dev. drivers/ssb/main.c | 2 +- 1 file changed, 1

[PATCH] scsi: scsi_transport_iscsi: use put_device() instead of kfree()

2018-03-07 Thread Arvind Yadav
Never directly free @dev after calling device_register(), even if it returned an error! Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav --- drivers/scsi/scsi_transport_iscsi.c | 27 +-- 1 file changed, 13 insertions(+), 14

[PATCH 1/2] sh: maple: use put_device() instead of kfree()

2018-03-07 Thread Arvind Yadav
Never directly free @dev after calling device_register(), even if it returned an error! Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav --- drivers/sh/maple/maple.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/sh/maple

[PATCH 2/2] sh: superhyway: use put_device() if device_register fail

2018-03-07 Thread Arvind Yadav
if device_register() returned an error! Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav --- drivers/sh/superhyway/superhyway.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/sh/superhyway/superhyway.c b/drivers

[PATCH 0/2] sh: use put_device() instead of kfree()

2018-03-07 Thread Arvind Yadav
Never directly free @dev after calling device_register(), even if it returned an error! Always use put_device() to give up the reference initialized. Arvind Yadav (2): [PATCH 1/2] sh: maple: use put_device() instead of kfree() [PATCH 2/2] sh: superhyway: use put_device() if device_register

[PATCH] slimbus: core: use put_device() instead of kfree()

2018-03-07 Thread Arvind Yadav
Never directly free @dev after calling device_register(), even if it returned an error! Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav --- drivers/slimbus/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/slimbus/core.c

[PATCH] ssb:: use put_device() if device_register fail

2018-03-07 Thread Arvind Yadav
if device_register() returned an error! Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav --- drivers/ssb/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c index 65420a9..c4449e0 100644 --- a/drivers/ssb

[PATCH] target: tcm_loop: use put_device() if device_register fail

2018-03-07 Thread Arvind Yadav
if device_register() returned an error! Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav --- drivers/target/loopback/tcm_loop.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c

[PATCH] w1: use put_device() if device_register() fail

2018-03-06 Thread Arvind Yadav
If device_register() returned an error! Always use put_device() to give up the reference initialized in device_register(). Signed-off-by: Arvind Yadav --- drivers/w1/w1.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c index 0c2a5a8..80a778b 100644 --- a

[PATCH] xen: xenbus: use put_device() instead of kfree()

2018-03-06 Thread Arvind Yadav
Never directly free @dev after calling device_register(), even if it returned an error! Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav --- drivers/xen/xenbus/xenbus_probe.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers

[PATCH v2] workqueue: use put_device() instead of kfree()

2018-03-06 Thread Arvind Yadav
Never directly free @dev after calling device_register(), even if it returned an error! Always use put_device() to give up the reference initialized in this function instead. Signed-off-by: Arvind Yadav --- changes in v2: Spell mistek in subject line "kfee -> kfree&qu

[PATCH] workqueue: use put_device() instead of kfee()

2018-03-06 Thread Arvind Yadav
Never directly free @dev after calling device_register(), even if it returned an error! Always use put_device() to give up the reference initialized in this function instead. Signed-off-by: Arvind Yadav --- kernel/workqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH v3] net: iucv: Free memory obtained by kzalloc

2018-03-01 Thread Arvind Yadav
Free memory by calling put_device(), if afiucv_iucv_init is not successful. Signed-off-by: Arvind Yadav --- changes in v2: Calling put_device() before kfree(). changes in v3: No need to call kfree(). So removed kfree(). net/iucv/af_iucv.c | 4 +++- 1 file changed, 3

Re: [PATCH] driver core: Free memory obtained by kzalloc

2018-03-01 Thread Arvind Yadav
Hi Andy, sorry for noise. On Thursday 01 March 2018 04:24 PM, Andy Shevchenko wrote: On Thu, Mar 1, 2018 at 7:59 AM, Arvind Yadav wrote: Here kfree() is taking NULL. So moving 'dev = NULL' after kfree(). Ouch! Does system_root_device_release() code ring a bell? How did you test

[PATCH] driver core: Free memory obtained by kzalloc

2018-02-28 Thread Arvind Yadav
Here kfree() is taking NULL. So moving 'dev = NULL' after kfree(). Signed-off-by: Arvind Yadav --- drivers/base/bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/bus.c b/drivers/base/bus.c index ef61833..ccb64a0 100644 --- a/drivers/base/bus.c +++

[PATCH v2] net: iucv: Free memory obtained by kzalloc

2018-02-28 Thread Arvind Yadav
Free memory, if afiucv_iucv_init is not successful. So calling put_device() before kfree(). This will decrement the last reference. Signed-off-by: Arvind Yadav --- changes in v2: Calling put_device() before kfree(). net/iucv/af_iucv.c | 5 - 1 file changed, 4 insertions(+), 1

Re: [PATCH] net: iucv: Free memory obtained by kzalloc

2018-02-28 Thread Arvind Yadav
On Wednesday 28 February 2018 05:26 PM, Cornelia Huck wrote: On Wed, 28 Feb 2018 17:14:55 +0530 Arvind Yadav wrote: On Wednesday 28 February 2018 04:00 PM, Cornelia Huck wrote: On Wed, 28 Feb 2018 15:24:16 +0530 Arvind Yadav wrote: Free memory, if afiucv_iucv_init is not successful

Re: [PATCH] net: iucv: Free memory obtained by kzalloc

2018-02-28 Thread Arvind Yadav
On Wednesday 28 February 2018 04:00 PM, Cornelia Huck wrote: On Wed, 28 Feb 2018 15:24:16 +0530 Arvind Yadav wrote: Free memory, if afiucv_iucv_init is not successful and removing a IUCV driver. Signed-off-by: Arvind Yadav --- net/iucv/af_iucv.c | 5 - 1 file changed, 4 insertions

[PATCH] net: iucv: Free memory obtained by kzalloc

2018-02-28 Thread Arvind Yadav
Free memory, if afiucv_iucv_init is not successful and removing a IUCV driver. Signed-off-by: Arvind Yadav --- net/iucv/af_iucv.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c index 1e8cc7b..eb0995a 100644 --- a/net/iucv

[tip:efi/core] efi/capsule-loader: Fix pr_err() string to end with newline

2018-01-03 Thread tip-bot for Arvind Yadav
Commit-ID: 76ad9dffd91be11e51b847eb115d623b713a3bdc Gitweb: https://git.kernel.org/tip/76ad9dffd91be11e51b847eb115d623b713a3bdc Author: Arvind Yadav AuthorDate: Tue, 2 Jan 2018 18:10:38 + Committer: Ingo Molnar CommitDate: Wed, 3 Jan 2018 14:03:48 +0100 efi/capsule-loader: Fix

[PATCH] ata_piix: constify pci_bits

2018-01-02 Thread Arvind Yadav
pci_bits are not supposed to change at runtime. Functions pci_test_config_bits() working with const 'struct pci_bits'. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/ata/ata_piix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d

[PATCH 09/11 v3] ARM: orion5x: constify gpio_led

2017-12-26 Thread Arvind Yadav
gpio_led are not supposed to change at runtime. struct gpio_led_platform_data working with const gpio_led provided by . So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- changes in v2: The GPIO LED driver can be built as a module, it can be

[PATCH 10/11 v2] ARM: s3c24xx/s3c64xx: constify gpio_led

2017-12-25 Thread Arvind Yadav
Signed-off-by: Arvind Yadav --- changes in v2: The GPIO LED driver can be built as a module, it can be loaded after the init sections have gone away. So removed '__initconst'. arch/arm/mach-s3c24xx/mach-h1940.c| 2 +- arch/arm/mach-s3

[PATCH 11/11 v2] ARM: pxa: constify gpio_led

2017-12-25 Thread Arvind Yadav
gpio_led are not supposed to change at runtime. struct gpio_led_platform_data working with const gpio_led provided by . So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- changes in v2: The GPIO LED driver can be built as a module, it can be

[PATCH 09/11 v2] ARM: orion5x: constify gpio_led

2017-12-25 Thread Arvind Yadav
gpio_led are not supposed to change at runtime. struct gpio_led_platform_data working with const gpio_led provided by . So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- changes in v2: The GPIO LED driver can be built as a module, it can be

[PATCH 06/11 v2] ARM: davinci: constify gpio_led

2017-12-25 Thread Arvind Yadav
gpio_led are not supposed to change at runtime. struct gpio_led_platform_data working with const gpio_led provided by . So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- changes in v2: The GPIO LED driver can be built as a module, it can be

[PATCH 07/11 v2] ARM: ixp4xx: constify gpio_led

2017-12-25 Thread Arvind Yadav
gpio_led are not supposed to change at runtime. struct gpio_led_platform_data working with const gpio_led provided by . So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- changes in v2: The GPIO LED driver can be built as a module, it can be

[PATCH 08/11 v2] ARM: OMAP1: constify gpio_led

2017-12-25 Thread Arvind Yadav
gpio_led are not supposed to change at runtime. struct gpio_led_platform_data working with const gpio_led provided by . So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- changes in v2: The GPIO LED driver can be built as a module, it can be

[PATCH 05/11 v2] sh: mach-rsk: rsk7203: constify gpio_led

2017-12-25 Thread Arvind Yadav
gpio_led are not supposed to change at runtime. struct gpio_led_platform_data working with const gpio_led provided by . So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- changes in v2: The GPIO LED driver can be built as a module, it can be

[PATCH 04/11 v2] x86: geode: constify gpio_led

2017-12-25 Thread Arvind Yadav
gpio_led are not supposed to change at runtime. struct gpio_led_platform_data working with const gpio_led provided by . So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- changes in v2: The GPIO LED driver can be built as a module, it can be

[PATCH 02/11 v2] MIPS: AR7: constify gpio_led

2017-12-25 Thread Arvind Yadav
gpio_led are not supposed to change at runtime. struct gpio_led_platform_data working with const gpio_led provided by . So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- changes in v2: The GPIO LED driver can be built as a module, it can be

[PATCH 03/11 v2] MIPS: TXX9: constify gpio_led

2017-12-25 Thread Arvind Yadav
gpio_led are not supposed to change at runtime. struct gpio_led_platform_data working with const gpio_led provided by . So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- changes in v2: The GPIO LED driver can be built as a module, it can be

[PATCH 01/11 v2] MIPS: Alchemy: constify gpio_led

2017-12-25 Thread Arvind Yadav
gpio_led are not supposed to change at runtime. struct gpio_led_platform_data working with const gpio_led provided by . So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- changes in v2: The GPIO LED driver can be built as a module, it can be

[PATCH 06/11] ARM: davinci: constify gpio_led

2017-12-20 Thread Arvind Yadav
gpio_led are not supposed to change at runtime. struct gpio_led_platform_data working with const gpio_led provided by . So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- arch/arm/mach-davinci/board-neuros-osd2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 10/11] ARM: s3c24xx: constify gpio_led

2017-12-20 Thread Arvind Yadav
gpio_led are not supposed to change at runtime. struct gpio_led_platform_data working with const gpio_led provided by . So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- arch/arm/mach-s3c24xx/mach-h1940.c| 2 +- arch/arm/mach-s3c24xx/mach-rx1950.c | 2 +- arch/arm

[PATCH 07/11] ARM: ixp4xx: constify gpio_led

2017-12-20 Thread Arvind Yadav
gpio_led are not supposed to change at runtime. struct gpio_led_platform_data working with const gpio_led provided by . So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- arch/arm/mach-ixp4xx/dsmg600-setup.c | 2 +- arch/arm/mach-ixp4xx/nas100d-setup.c | 2 +- arch/arm/mach

[PATCH 08/11] ARM: OMAP1: constify gpio_led

2017-12-20 Thread Arvind Yadav
gpio_led are not supposed to change at runtime. struct gpio_led_platform_data working with const gpio_led provided by . So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- arch/arm/mach-omap1/board-h2.c| 2 +- arch/arm/mach-omap1/board-h3.c| 2 +- arch/arm

[PATCH 11/11] ARM: pxa: constify gpio_led

2017-12-20 Thread Arvind Yadav
gpio_led are not supposed to change at runtime. struct gpio_led_platform_data working with const gpio_led provided by . So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- arch/arm/mach-pxa/balloon3.c | 4 ++-- arch/arm/mach-pxa/corgi.c | 2 +- arch/arm/mach-pxa/csb701

[PATCH 09/11] ARM: orion5x: constify gpio_led

2017-12-20 Thread Arvind Yadav
gpio_led are not supposed to change at runtime. struct gpio_led_platform_data working with const gpio_led provided by . So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- arch/arm/mach-orion5x/board-d2net.c | 2 +- arch/arm/mach-orion5x/dns323-setup.c | 2 +- arch

[PATCH 05/11] sh: mach-rsk: rsk7203: constify gpio_led

2017-12-20 Thread Arvind Yadav
gpio_led are not supposed to change at runtime. struct gpio_led_platform_data working with const gpio_led provided by . So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- arch/sh/boards/mach-rsk/devices-rsk7203.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 01/11] MIPS: Alchemy: constify gpio_led

2017-12-20 Thread Arvind Yadav
gpio_led are not supposed to change at runtime. struct gpio_led_platform_data working with const gpio_led provided by . So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- arch/mips/alchemy/board-gpr.c | 2 +- arch/mips/alchemy/board-mtx1.c | 2 +- 2 files changed, 2

[PATCH 00/11] constify gpio_led

2017-12-20 Thread Arvind Yadav
gpio_led are not supposed to change at runtime. struct gpio_led_platform_data working with const gpio_led provided by . So mark the non-const structs as const. Arvind Yadav (11): [PATCH 01/11] MIPS: Alchemy: constify gpio_led [PATCH 02/11] MIPS: AR7: constify gpio_led [PATCH 03/11] MIPS

[PATCH 04/11] x86: geode: constify gpio_led

2017-12-20 Thread Arvind Yadav
gpio_led are not supposed to change at runtime. struct gpio_led_platform_data working with const gpio_led provided by . So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- arch/x86/platform/geode/alix.c| 2 +- arch/x86/platform/geode/geos.c| 2 +- arch/x86/platform

[PATCH 02/11] MIPS: AR7: constify gpio_led

2017-12-20 Thread Arvind Yadav
gpio_led are not supposed to change at runtime. struct gpio_led_platform_data working with const gpio_led provided by . So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- arch/mips/ar7/platform.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff

[PATCH 03/11] MIPS: TXX9: constify gpio_led

2017-12-20 Thread Arvind Yadav
gpio_led are not supposed to change at runtime. struct gpio_led_platform_data working with const gpio_led provided by . So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- arch/mips/txx9/rbtx4927/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH] isdn: avm: Handle return value of skb_dequeue()

2017-12-16 Thread Arvind Yadav
skb_dequeue() will return NULL for an empty list or a pointer to the head element. Signed-off-by: Arvind Yadav --- drivers/isdn/hardware/avm/b1dma.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/isdn/hardware/avm/b1dma.c b/drivers/isdn/hardware/avm/b1dma.c index 9538a9e

[PATCH] NFC: Handle return value of skb_dequeue()

2017-12-16 Thread Arvind Yadav
skb_dequeue() will return NULL for an empty list or a pointer to the head element. Signed-off-by: Arvind Yadav --- net/nfc/rawsock.c | 4 1 file changed, 4 insertions(+) diff --git a/net/nfc/rawsock.c b/net/nfc/rawsock.c index e2188de..c6de1ac 100644 --- a/net/nfc/rawsock.c +++ b/net/nfc

[PATCH v5] pata_pdc2027x: Fix pdc_adjust_pll() to return the error value

2017-12-06 Thread Arvind Yadav
This change is to ensure that function pdc_adjust_pll() returns the error value to avoid the unnecessary error check for pdc_hardware_init() in pdc2027x_reinit_one(). Signed-off-by: Arvind Yadav --- changes in v2 : Make function return type 'void' inste

Re: [PATCH] driver-core: platform: Avoid to return IRQ 0 in platform_get_irq()

2017-12-05 Thread Arvind Yadav
Hi Dmitry, On Tuesday 05 December 2017 11:50 PM, Dmitry Torokhov wrote: On Tue, Dec 05, 2017 at 11:41:52PM +0530, Arvind Yadav wrote: Function platform_get_irq() can return 0. Which means NO_IRQ. So this change will not allow to return 0. This change is help to use platform_get_irq() without

[PATCH v4] pata_pdc2027x: Fix pdc_adjust_pll() to return the error value

2017-12-05 Thread Arvind Yadav
This change is to ensure that function pdc_adjust_pll() returns the error value to avoid the unnecessary error check for pdc_hardware_init() in pdc2027x_reinit_one(). Signed-off-by: Arvind Yadav --- changes in v2 : Make function return type 'void' inste

[PATCH v2] pata_pdc2027x: Fix coding sytle errors

2017-12-05 Thread Arvind Yadav
27; (ctx:VxW) + long pout_required = board_idx? PDC_133_MHZ:PDC_100_MHZ; ERROR: that open brace { should be on the previous line + const struct ata_port_info *ppi[] = + { &pdc2027x_port_info[board_idx], NULL }; Signed-off-by: Arvind Yadav --- changes in v2:

[PATCH] driver-core: platform: Avoid to return IRQ 0 in platform_get_irq()

2017-12-05 Thread Arvind Yadav
Function platform_get_irq() can return 0. Which means NO_IRQ. So this change will not allow to return 0. This change is help to use platform_get_irq() without this, val = platform_get_irq(); if (val <= 0) ret = val ? val : -ENODEV; Signed-off-by: Arvind Ya

Re: [PATCH 0/7 v2] net: Fix platform_get_irq's error checking

2017-12-05 Thread Arvind Yadav
Hi Sergei, On Tuesday 05 December 2017 03:27 PM, Sergei Shtylyov wrote: On 12/5/2017 12:54 PM, Sergei Shtylyov wrote: The platform_get_irq() function returns negative number if an error occurs, Zero if No irq is found and positive number if irq gets successful. No, returning 0 is not a

Re: [PATCH 4/7 v2] net: ethernet: i825xx: Fix platform_get_irq's error checking

2017-12-04 Thread Arvind Yadav
Hi David, On Monday 04 December 2017 11:55 PM, David Miller wrote: From: Arvind Yadav Date: Mon, 4 Dec 2017 23:18:20 +0530 @@ -120,9 +120,10 @@ static int sni_82596_probe(struct platform_device *dev) netdevice->dev_addr[5] = readb(eth_addr + 0x06); iounmap(eth_a

  1   2   3   4   5   6   7   8   9   10   >