Tom Rix
e94a3d7630
hwmon: (applesmc) check status earlier.
...
[ Upstream commit cecf7560f00a8419396a2ed0f6e5d245ccb4feac ]
clang static analysis reports this representative problem
applesmc.c:758:10: warning: 1st function call argument is an
uninitialized value
left = be16_to_cpu(*(__be16 *)(buffer + 6)) >> 2;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
buffer is filled by the earlier call
ret = applesmc_read_key(LIGHT_SENSOR_LEFT_KEY, ...
This problem is reported because a goto skips the status check.
Other similar problems use data from applesmc_read_key before checking
the status. So move the checks to before the use.
Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Henrik Rydberg <rydberg@bitmath.org>
Link: https://lore.kernel.org/r/20200820131932.10590-1-trix@redhat.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-09-09 19:12:20 +02:00
..
2019-07-21 19:18:45 -07:00
2020-07-29 10:18:38 +02:00
2019-05-30 11:29:22 -07:00
2019-05-24 17:36:45 +02:00
2019-05-24 17:36:45 +02:00
2019-05-30 11:29:22 -07:00
2019-05-30 11:29:22 -07:00
2020-07-09 09:37:53 +02:00
2019-05-30 11:25:18 -07:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:37:10 +02:00
2019-05-30 11:26:37 -07:00
2019-05-24 17:36:45 +02:00
2019-05-24 17:36:45 +02:00
2019-05-24 17:36:45 +02:00
2019-05-24 17:36:45 +02:00
2019-06-23 18:34:11 -07:00
2019-05-24 17:36:45 +02:00
2019-05-24 17:36:45 +02:00
2019-05-24 17:36:45 +02:00
2019-05-24 17:36:42 +02:00
2019-05-24 17:36:45 +02:00
2017-11-02 11:10:55 +01:00
2019-05-30 11:25:18 -07:00
2019-05-30 11:25:18 -07:00
2019-06-19 17:09:55 +02:00
2020-03-12 13:00:30 +01:00
2019-05-30 11:26:35 -07:00
2020-01-29 16:45:24 +01:00
2019-05-24 17:36:45 +02:00
2020-09-09 19:12:20 +02:00
2019-09-03 12:47:17 -07:00
2019-09-03 12:47:17 -07:00
2019-05-24 17:36:45 +02:00
2020-07-29 10:18:37 +02:00
2019-06-23 18:33:01 -07:00
2019-07-31 13:25:27 -06:00
2019-08-31 08:04:57 -07:00
2020-05-20 08:20:26 +02:00
2019-05-30 11:26:32 -07:00
2019-05-24 17:39:02 +02:00
2019-05-24 17:36:45 +02:00
2019-05-24 17:36:45 +02:00
2019-05-24 17:36:45 +02:00
2019-05-24 17:36:45 +02:00
2019-05-30 11:26:39 -07:00
2020-07-22 09:33:14 +02:00
2019-05-24 17:36:45 +02:00
2019-05-30 11:26:35 -07:00
2019-05-24 17:36:45 +02:00
2019-05-24 17:36:43 +02:00
2019-05-24 17:36:45 +02:00
2019-05-30 11:26:37 -07:00
2019-05-30 11:26:32 -07:00
2019-05-21 11:28:47 +02:00
2019-05-24 17:36:45 +02:00
2019-05-24 17:36:45 +02:00
2019-07-08 18:11:32 -07:00
2019-05-24 17:39:00 +02:00
2019-05-24 17:36:45 +02:00
2020-01-29 16:45:24 +01:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:37 -07:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:35 -07:00
2019-05-24 17:39:01 +02:00
2019-09-03 12:47:17 -07:00
2019-06-05 17:37:17 +02:00
2019-06-05 17:37:17 +02:00
2019-10-28 18:46:55 -07:00
2019-05-30 11:26:37 -07:00
2020-05-02 08:48:59 +02:00
2019-09-03 12:47:17 -07:00
2020-06-22 09:31:19 +02:00
2019-09-22 09:30:30 -07:00
2019-05-24 17:36:45 +02:00
2019-05-24 17:36:45 +02:00
2019-05-24 17:36:45 +02:00
2019-06-05 17:37:04 +02:00
2019-09-04 11:06:47 -07:00
2019-05-24 17:36:45 +02:00
2019-05-30 11:26:37 -07:00
2019-05-24 17:36:45 +02:00
2019-05-24 17:36:45 +02:00
2019-05-30 11:26:37 -07:00
2019-05-24 17:36:45 +02:00
2019-05-24 17:36:45 +02:00
2019-07-08 18:11:31 -07:00
2019-05-30 11:26:37 -07:00
2019-05-24 17:36:45 +02:00
2019-05-30 11:26:37 -07:00
2019-05-30 11:26:37 -07:00
2019-05-30 11:26:37 -07:00
2019-04-15 17:19:53 -07:00
2019-05-30 11:26:37 -07:00
2019-09-03 12:47:17 -07:00
2019-05-24 17:36:45 +02:00
2019-06-05 17:37:17 +02:00
2019-05-30 11:26:37 -07:00
2019-06-05 17:37:17 +02:00
2019-05-30 11:26:37 -07:00
2019-05-24 17:36:45 +02:00
2019-05-21 11:28:45 +02:00
2019-09-22 09:30:30 -07:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:06 +02:00
2019-05-30 11:26:37 -07:00
2019-05-24 17:36:45 +02:00
2019-05-30 11:26:37 -07:00
2019-05-24 17:36:45 +02:00
2019-05-24 17:36:45 +02:00
2019-06-23 18:33:01 -07:00
2020-07-09 09:37:53 +02:00
2019-06-05 17:37:17 +02:00
2019-06-05 17:37:06 +02:00
2019-05-30 11:26:37 -07:00
2019-02-18 14:23:29 -08:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-16 07:56:57 -07:00
2019-05-30 11:26:37 -07:00
2020-07-29 10:18:39 +02:00
2020-01-29 16:45:30 +01:00
2020-09-03 11:26:54 +02:00
2019-09-03 12:47:17 -07:00
2019-06-05 17:37:14 +02:00
2019-05-30 11:26:35 -07:00
2019-05-24 17:36:45 +02:00
2019-05-30 11:26:41 -07:00
2019-05-24 17:36:45 +02:00
2019-05-30 11:26:37 -07:00
2019-08-28 22:52:30 +02:00
2019-09-03 12:47:17 -07:00
2019-06-05 17:37:06 +02:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:35 -07:00
2020-07-29 10:18:39 +02:00
2019-06-23 18:34:11 -07:00
2019-05-30 11:26:37 -07:00
2019-04-17 10:37:23 -07:00
2019-05-24 17:39:00 +02:00
2019-09-10 11:42:56 -07:00
2019-05-24 17:36:45 +02:00
2019-09-17 16:22:26 -07:00
2019-05-24 17:36:45 +02:00
2019-06-23 18:33:01 -07:00
2019-05-24 17:36:45 +02:00
2019-05-30 11:26:37 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:37 -07:00
2019-05-24 17:36:45 +02:00
2019-05-30 11:26:37 -07:00
2019-05-30 11:26:37 -07:00
2019-05-30 11:26:37 -07:00
2019-05-24 17:36:45 +02:00
2019-05-30 11:26:37 -07:00
2019-05-21 10:50:45 +02:00
2019-05-30 11:26:41 -07:00
2019-05-24 17:36:45 +02:00
2019-05-30 11:26:38 -07:00
2019-05-24 17:36:45 +02:00
2019-05-24 17:36:45 +02:00
2019-05-24 17:36:45 +02:00
2019-06-05 17:30:30 +02:00
2019-05-24 17:36:45 +02:00
2019-05-24 17:36:45 +02:00
2019-05-30 11:26:32 -07:00
2019-09-03 12:47:17 -07:00
2019-09-03 12:47:17 -07:00
2019-09-03 12:47:17 -07:00
2019-09-03 12:47:17 -07:00
2019-06-05 17:30:30 +02:00
2019-06-05 17:30:30 +02:00
2019-06-05 17:30:30 +02:00
2019-05-21 11:28:45 +02:00