summaryrefslogtreecommitdiff
path: root/src/device
diff options
context:
space:
mode:
Diffstat (limited to 'src/device')
-rw-r--r--src/device/pci_class.c2
-rw-r--r--src/device/pci_rom.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/device/pci_class.c b/src/device/pci_class.c
index b2f5ff765c..1326b2c0cc 100644
--- a/src/device/pci_class.c
+++ b/src/device/pci_class.c
@@ -263,7 +263,7 @@ const char *get_pci_subclass_name(struct device *dev)
subclass_name = "???";
class_entry = get_pci_class_entry(dev);
subclass_entry = class_entry ? class_entry->subclass_list : NULL;
- if (NULL != subclass_entry) {
+ if (subclass_entry != NULL) {
subclass_list_end =
&subclass_entry[class_entry->subclass_entries];
while (subclass_list_end > subclass_entry) {
diff --git a/src/device/pci_rom.c b/src/device/pci_rom.c
index 65989d4724..82d9a3056a 100644
--- a/src/device/pci_rom.c
+++ b/src/device/pci_rom.c
@@ -150,7 +150,7 @@ struct rom_header *pci_rom_load(struct device *dev,
* whether the ROM image is for a VGA device because some
* devices have a mismatch between the hardware and the ROM.
*/
- if (PCI_CLASS_DISPLAY_VGA == (dev->class >> 8)) {
+ if ((dev->class >> 8) == PCI_CLASS_DISPLAY_VGA) {
#if !IS_ENABLED(CONFIG_MULTIPLE_VGA_ADAPTERS)
extern struct device *vga_pri; /* Primary VGA device (device.c). */
if (dev != vga_pri) return NULL; /* Only one VGA supported. */