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

mfd: mcp-sa11x0: 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
3b87b4eb c3d6a0a3

-3
-3
drivers/mfd/mcp-sa11x0.c
··· 225 225 if (ret == 0) 226 226 return 0; 227 227 228 - platform_set_drvdata(dev, NULL); 229 - 230 228 err_ioremap: 231 229 iounmap(m->base1); 232 230 iounmap(m->base0); ··· 250 252 mem0 = platform_get_resource(dev, IORESOURCE_MEM, 0); 251 253 mem1 = platform_get_resource(dev, IORESOURCE_MEM, 1); 252 254 253 - platform_set_drvdata(dev, NULL); 254 255 mcp_host_del(mcp); 255 256 iounmap(m->base1); 256 257 iounmap(m->base0);