Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drivers/block/swim.c: remove unnecessary platform_set_drvdata()

The driver core clears the driver data to NULL after device_release or
on probe failure. Thus, it is not needed to manually clear the device
driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Jingoo Han and committed by
Linus Torvalds
c07303c0 e7b18ede

-2
-2
drivers/block/swim.c
··· 924 924 return 0; 925 925 926 926 out_kfree: 927 - platform_set_drvdata(dev, NULL); 928 927 kfree(swd); 929 928 out_iounmap: 930 929 iounmap(swim_base); ··· 961 962 if (res) 962 963 release_mem_region(res->start, resource_size(res)); 963 964 964 - platform_set_drvdata(dev, NULL); 965 965 kfree(swd); 966 966 967 967 return 0;