The patch titled WAN/pc300: handle, propagate minor errors has been added to the -mm tree. Its filename is wan-pc300-handle-propagate-minor-errors.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: WAN/pc300: handle, propagate minor errors From: Jeff Garzik <jeff@xxxxxxxxxx> - move definition of 'tmc' and 'br' locals closer to usage - handle clock_rate_calc() error - propagate errors back to upper level open routine Signed-off-by: Jeff Garzik <jeff@xxxxxxxxxx> Cc: Krzysztof Halasa <khc@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- drivers/net/wan/pc300_drv.c | 24 +++++++++++++++++++----- 1 files changed, 19 insertions(+), 5 deletions(-) diff -puN drivers/net/wan/pc300_drv.c~wan-pc300-handle-propagate-minor-errors drivers/net/wan/pc300_drv.c --- a/drivers/net/wan/pc300_drv.c~wan-pc300-handle-propagate-minor-errors +++ a/drivers/net/wan/pc300_drv.c @@ -2867,7 +2867,6 @@ static int ch_config(pc300dev_t * d) uclong clktype = chan->conf.phys_settings.clock_type; ucshort encoding = chan->conf.proto_settings.encoding; ucshort parity = chan->conf.proto_settings.parity; - int tmc, br; ucchar md0, md2; /* Reset the channel */ @@ -2940,8 +2939,12 @@ static int ch_config(pc300dev_t * d) case PC300_RSV: case PC300_X21: if (clktype == CLOCK_INT || clktype == CLOCK_TXINT) { + int tmc, br; + /* Calculate the clkrate parameters */ tmc = clock_rate_calc(clkrate, card->hw.clock, &br); + if (tmc < 0) + return -EIO; cpc_writeb(scabase + M_REG(TMCT, ch), tmc); cpc_writeb(scabase + M_REG(TXS, ch), (TXS_DTRXC | TXS_IBRG | br)); @@ -3097,14 +3100,16 @@ static int cpc_attach(struct net_device return 0; } -static void cpc_opench(pc300dev_t * d) +static int cpc_opench(pc300dev_t * d) { pc300ch_t *chan = (pc300ch_t *) d->chan; pc300_t *card = (pc300_t *) chan->card; - int ch = chan->channel; + int ch = chan->channel, rc; void __iomem *scabase = card->hw.scabase; - ch_config(d); + rc = ch_config(d); + if (rc) + return rc; rx_config(d); @@ -3113,6 +3118,8 @@ static void cpc_opench(pc300dev_t * d) /* Assert RTS and DTR */ cpc_writeb(scabase + M_REG(CTL, ch), cpc_readb(scabase + M_REG(CTL, ch)) & ~(CTL_RTS | CTL_DTR)); + + return 0; } static void cpc_closech(pc300dev_t * d) @@ -3168,9 +3175,16 @@ int cpc_open(struct net_device *dev) } sprintf(ifr.ifr_name, "%s", dev->name); - cpc_opench(d); + result = cpc_opench(d); + if (result) + goto err_out; + netif_start_queue(dev); return 0; + +err_out: + hdlc_close(dev); + return result; } static int cpc_close(struct net_device *dev) _ Patches currently in -mm which might be from jeff@xxxxxxxxxx are origin.patch tpm-fix-error-handling.patch x86-microcode-handle-sysfs-error.patch firmware-dell_rbu-handle-sysfs-errors.patch ipmi-handle-sysfs-errors.patch eisa-handle-sysfs-errors.patch firmware-efivars-handle-error.patch drivers-mca-handle-sysfs-errors.patch isdn-several-minor-fixes.patch fix-up-a-multitude-of-acpi-compiler-warnings-on-x86_64.patch cpufreq-handle-sysfs-errors.patch drm-fix-error-returns-sysfs-error-handling.patch git-dvb.patch i2c-buses-scx200_acb-handle-pci-errors.patch input-handle-sysfs-errors.patch input-drivers-handle-sysfs-errors.patch git-libata-all.patch ata-must-depend-on-block.patch pci_module_init-conversion-for-pata_pdc2027x.patch libata-return-sense-data-in-hdio_drive_cmd-ioctl.patch via-pata-controller-xfer-fixes.patch ahci-ati-sb600-sata-support-for-various-modes.patch git-mtd.patch git-netdev-all.patch libphy-dont-do-that.patch update-smc91x-driver-with-arm-versatile-board-info.patch b44-fix-eeprom-endianess-issue.patch forcedeth-power-management-support.patch remove-unnecessary-check-in-drivers-net-depcac.patch 8139too-force-media-setting-fix.patch ibmveth-irq-fix.patch ehea-firmware-interface-based-on-anton-blanchards-new-hvcall-interface.patch tulip-fix-shutdown-dma-irq-race.patch drivers-dma-handle-sysfs-errors.patch atm-firestream-handle-thrown-error.patch wan-pc300-handle-propagate-minor-errors.patch r8169-driver-corega-support-patch.patch git-pciseg.patch scsi-minor-bug-fixes-and-cleanups.patch watchdog-itco_wdt-fix-bug-related-to-gcc-uninit-warning.patch airo-suspend-fix.patch drivers-led-handle-sysfs-errors.patch i2o-handle-a-few-sysfs-errors.patch fs-partitions-check-add-sysfs-error-handling.patch rtc-fix-printk-of-64-bit-res-on-32-bit-platform.patch atyfb-rivafb-minor-fixes.patch md-conditionalize-some-code.patch git-gccbug.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html