diff options
author | Toomas Soome <tsoome@me.com> | 2020-01-31 08:16:46 +0200 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2020-06-05 09:15:01 +0300 |
commit | fa4e72b04e6507456698cd5d25ff74f4ab5d2056 (patch) | |
tree | 6d13a4e98965a688caaf519dc20757970eac8f9e /usr/src/uts/sun4u | |
parent | 5be38ebbbdbfff51cf09152ef2c304a0b4d68c0f (diff) | |
download | illumos-gate-fa4e72b04e6507456698cd5d25ff74f4ab5d2056.tar.gz |
12570 pca9556: NULL pointer errors
Reviewed by: Yuri Pankov <ypankov@tintri.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/uts/sun4u')
-rw-r--r-- | usr/src/uts/sun4u/io/i2c/clients/pca9556.c | 22 | ||||
-rw-r--r-- | usr/src/uts/sun4u/pca9556/Makefile | 20 |
2 files changed, 11 insertions, 31 deletions
diff --git a/usr/src/uts/sun4u/io/i2c/clients/pca9556.c b/usr/src/uts/sun4u/io/i2c/clients/pca9556.c index 1b972ca6d7..7fe812e0ac 100644 --- a/usr/src/uts/sun4u/io/i2c/clients/pca9556.c +++ b/usr/src/uts/sun4u/io/i2c/clients/pca9556.c @@ -177,9 +177,9 @@ _info(struct modinfo *modinfop) static int pca9556_resume(dev_info_t *dip) { - int instance = ddi_get_instance(dip); + int instance = ddi_get_instance(dip); pca9556_unit_t *pcap; - int err = DDI_SUCCESS; + int err = DDI_SUCCESS; int reg_offset, num_of_ports; int i, j; uint8_t reg, reg_num = 0; @@ -257,7 +257,7 @@ static void pca9556_detach(dev_info_t *dip) { pca9556_unit_t *pcap; - int instance = ddi_get_instance(dip); + int instance = ddi_get_instance(dip); pcap = ddi_get_soft_state(pca9556_soft_statep, instance); @@ -279,11 +279,11 @@ pca9556_detach(dev_info_t *dip) static int pca9556_attach(dev_info_t *dip) { - pca9556_unit_t *pcap; - int instance = ddi_get_instance(dip); + pca9556_unit_t *pcap; + int instance = ddi_get_instance(dip); char name[MAXNAMELEN]; char *device_name; - minor_t minor; + minor_t minor; int i, num_ports; if (ddi_soft_state_zalloc(pca9556_soft_statep, instance) != 0) { @@ -328,7 +328,7 @@ pca9556_attach(dev_info_t *dip) } if (ddi_create_minor_node(dip, name, S_IFCHR, minor, - PCA9556_NODE_TYPE, NULL) == DDI_FAILURE) { + PCA9556_NODE_TYPE, 0) == DDI_FAILURE) { cmn_err(CE_WARN, "%s: failed to create node for %s", pcap->pca9556_name, name); pca9556_detach(dip); @@ -414,8 +414,8 @@ pca9556_s_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) static int pca9556_suspend(dev_info_t *dip) { - pca9556_unit_t *pcap; - int instance = ddi_get_instance(dip); + pca9556_unit_t *pcap; + int instance = ddi_get_instance(dip); int err = DDI_SUCCESS; int reg_offset, num_of_ports; int i, j; @@ -574,7 +574,7 @@ static int pca9556_close(dev_t dev, int flags, int otyp, cred_t *credp) { int instance; - pca9556_unit_t *pcap; + pca9556_unit_t *pcap; _NOTE(ARGUNUSED(flags, credp)) @@ -599,7 +599,7 @@ pca9556_close(dev_t dev, int flags, int otyp, cred_t *credp) static int pca9556_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *credp, - int *rvalp) + int *rvalp) { pca9556_unit_t *pcap; int err = 0; diff --git a/usr/src/uts/sun4u/pca9556/Makefile b/usr/src/uts/sun4u/pca9556/Makefile index 182a32f4e1..0ffc4a3320 100644 --- a/usr/src/uts/sun4u/pca9556/Makefile +++ b/usr/src/uts/sun4u/pca9556/Makefile @@ -34,7 +34,6 @@ UTSBASE = ../.. # MODULE = pca9556 OBJECTS = $(PCA9556_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(PCA9556_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) # @@ -42,27 +41,14 @@ ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) # include $(UTSBASE)/sun4u/Makefile.sun4u -# -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) - LDFLAGS += -dy -N misc/i2c_svc -# -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. -# Please do not carry these forward to new Makefiles. -# -LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV - CERRWARN += $(CNOWARN_UNINIT) # # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) .KEEP_STATE: @@ -75,12 +61,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # |