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

Configure Feed

Select the types of activity you want to include in your feed.

extcon: Drop unneeded assignments

In one case the assignment is duplicative, in the other,
it's better to move it into the loop — the user of it.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>

authored by

Andy Shevchenko and committed by
Chanwoo Choi
93e60cd5 ef753fb4

+3 -3
+3 -3
drivers/extcon/extcon.c
··· 245 245 246 246 static int check_mutually_exclusive(struct extcon_dev *edev, u32 new_state) 247 247 { 248 - int i = 0; 248 + int i; 249 249 250 250 if (!edev->mutually_exclusive) 251 251 return 0; ··· 1246 1246 */ 1247 1247 int extcon_dev_register(struct extcon_dev *edev) 1248 1248 { 1249 - int ret, index = 0; 1249 + int ret, index; 1250 1250 1251 1251 ret = create_extcon_class(); 1252 1252 if (ret < 0) ··· 1255 1255 if (!edev || !edev->supported_cable) 1256 1256 return -EINVAL; 1257 1257 1258 - for (; edev->supported_cable[index] != EXTCON_NONE; index++); 1258 + for (index = 0; edev->supported_cable[index] != EXTCON_NONE; index++); 1259 1259 1260 1260 edev->max_supported = index; 1261 1261 if (index > SUPPORTED_CABLE_MAX) {