@@ -202,7 +202,7 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr)
202
202
}
203
203
204
204
pct = (union acpi_object * )buffer .pointer ;
205
- if (!pct || ( pct -> type != ACPI_TYPE_PACKAGE ) || ( pct -> package .count != 2 ) ) {
205
+ if (!pct || pct -> type != ACPI_TYPE_PACKAGE || pct -> package .count != 2 ) {
206
206
pr_err ("Invalid _PCT data\n" );
207
207
result = - EFAULT ;
208
208
goto end ;
@@ -214,9 +214,8 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr)
214
214
215
215
obj = pct -> package .elements [0 ];
216
216
217
- if ((obj .type != ACPI_TYPE_BUFFER ) ||
218
- (obj .buffer .length < sizeof (struct acpi_pct_register )) ||
219
- (obj .buffer .pointer == NULL )) {
217
+ if (!obj .buffer .pointer || obj .type != ACPI_TYPE_BUFFER ||
218
+ obj .buffer .length < sizeof (struct acpi_pct_register )) {
220
219
pr_err ("Invalid _PCT data (control_register)\n" );
221
220
result = - EFAULT ;
222
221
goto end ;
@@ -230,9 +229,8 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr)
230
229
231
230
obj = pct -> package .elements [1 ];
232
231
233
- if ((obj .type != ACPI_TYPE_BUFFER ) ||
234
- (obj .buffer .length < sizeof (struct acpi_pct_register )) ||
235
- (obj .buffer .pointer == NULL )) {
232
+ if (!obj .buffer .pointer || obj .type != ACPI_TYPE_BUFFER ||
233
+ obj .buffer .length < sizeof (struct acpi_pct_register )) {
236
234
pr_err ("Invalid _PCT data (status_register)\n" );
237
235
result = - EFAULT ;
238
236
goto end ;
@@ -300,7 +298,7 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)
300
298
}
301
299
302
300
pss = buffer .pointer ;
303
- if (!pss || ( pss -> type != ACPI_TYPE_PACKAGE ) ) {
301
+ if (!pss || pss -> type != ACPI_TYPE_PACKAGE ) {
304
302
pr_err ("Invalid _PSS data\n" );
305
303
result = - EFAULT ;
306
304
goto end ;
@@ -353,7 +351,7 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)
353
351
* Check that ACPI's u64 MHz will be valid as u32 KHz in cpufreq
354
352
*/
355
353
if (!px -> core_frequency ||
356
- (( u32 )(px -> core_frequency * 1000 ) != ( px -> core_frequency * 1000 )) ) {
354
+ (u32 )(px -> core_frequency * 1000 ) != px -> core_frequency * 1000 ) {
357
355
pr_err (FW_BUG
358
356
"Invalid BIOS _PSS frequency found for processor %d: 0x%llx MHz\n" ,
359
357
pr -> id , px -> core_frequency );
@@ -515,7 +513,7 @@ int acpi_processor_get_psd(acpi_handle handle, struct acpi_psd_package *pdomain)
515
513
}
516
514
517
515
psd = buffer .pointer ;
518
- if (!psd || ( psd -> type != ACPI_TYPE_PACKAGE ) ) {
516
+ if (!psd || psd -> type != ACPI_TYPE_PACKAGE ) {
519
517
pr_err ("Invalid _PSD data\n" );
520
518
result = - EFAULT ;
521
519
goto end ;
0 commit comments