Do not try to attach spdmem if i2c adress exceed 0x57.

It must follow the reserved eeprom adresses range.
This commit is contained in:
njoly 2007-12-14 13:18:43 +00:00
parent 4ed89c84f0
commit 74ac36ac9c
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: spdmem.c,v 1.5 2007/12/13 15:36:29 xtraeme Exp $ */
/* $NetBSD: spdmem.c,v 1.6 2007/12/14 13:18:43 njoly Exp $ */
/*
* Copyright (c) 2007 Nicolas Joly
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: spdmem.c,v 1.5 2007/12/13 15:36:29 xtraeme Exp $");
__KERNEL_RCSID(0, "$NetBSD: spdmem.c,v 1.6 2007/12/14 13:18:43 njoly Exp $");
#include <sys/param.h>
#include <sys/device.h>
@ -124,7 +124,7 @@ spdmem_match(struct device *parent, struct cfdata *match, void *aux)
int cksum = 0;
uint8_t i, val;
if (ia->ia_addr < 0x50)
if (ia->ia_addr < 0x50 || ia->ia_addr > 0x57)
return 0;
sc.sc_tag = ia->ia_tag;