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

mfd: twl4030-audio: Remove unnecessary platform_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
(device-core: Ensure drvdata = NULL when no driver is bound).
Thus, it is not needed to manually clear the device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>

authored by

Jingoo Han and committed by
Samuel Ortiz
96ac2d1a 9f74f5b5

+1 -4
+1 -4
drivers/mfd/twl4030-audio.c
··· 261 261 ret = -ENODEV; 262 262 } 263 263 264 - if (ret) { 265 - platform_set_drvdata(pdev, NULL); 264 + if (ret) 266 265 twl4030_audio_dev = NULL; 267 - } 268 266 269 267 return ret; 270 268 } ··· 270 272 static int twl4030_audio_remove(struct platform_device *pdev) 271 273 { 272 274 mfd_remove_devices(&pdev->dev); 273 - platform_set_drvdata(pdev, NULL); 274 275 twl4030_audio_dev = NULL; 275 276 276 277 return 0;