Module Name:    src
Committed By:   thorpej
Date:           Thu Jan 28 14:57:43 UTC 2021

Modified Files:
        src/sys/dev/i2c: at24cxx.c

Log Message:
No need to consult ia->ia_ncompat before calling iic_compatible_lookup().


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/dev/i2c/at24cxx.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/i2c/at24cxx.c
diff -u src/sys/dev/i2c/at24cxx.c:1.40 src/sys/dev/i2c/at24cxx.c:1.41
--- src/sys/dev/i2c/at24cxx.c:1.40	Wed Jan 27 02:29:48 2021
+++ src/sys/dev/i2c/at24cxx.c	Thu Jan 28 14:57:43 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: at24cxx.c,v 1.40 2021/01/27 02:29:48 thorpej Exp $	*/
+/*	$NetBSD: at24cxx.c,v 1.41 2021/01/28 14:57:43 thorpej Exp $	*/
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: at24cxx.c,v 1.40 2021/01/27 02:29:48 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: at24cxx.c,v 1.41 2021/01/28 14:57:43 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -180,7 +180,7 @@ seeprom_attach(device_t parent, device_t
 	if (device_cfdata(self)->cf_flags)
 		sc->sc_size = (device_cfdata(self)->cf_flags << 7);
 
-	if (sc->sc_size <= 0 && ia->ia_ncompat > 0) {
+	if (sc->sc_size <= 0) {
 		if ((dce = iic_compatible_lookup(ia, compat_data)) != NULL)
 			sc->sc_size = dce->value;
 	}

Reply via email to