i2c: mux: pca954x: Move device_remove_file() out of pca954x_cleanup()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Sat, 25 Apr 2020 11:51:51 +0000 (14:51 +0300)
committerWolfram Sang <wsa@kernel.org>
Mon, 11 May 2020 19:23:16 +0000 (21:23 +0200)
commit3093c64101729e9b2b7be409abf3ebc4735f2b1e
tree9e91890a37b6e6daa094a9653ac1982d86be9d81
parent753aa3694382c5d967dcb427ae0c3ee199bd21aa
i2c: mux: pca954x: Move device_remove_file() out of pca954x_cleanup()

device_create_file() is called the last in ->probe() but pca954x_cleanup(),
which is called earlier in error path, tries to remove never created file.
Move device_remove_file() call outside of pca954x_cleanup() to make it
slightly closer to what pca954x_init() is doing.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/muxes/i2c-mux-pca954x.c