Here's a patchset to fix error/exit paths in 2.5. This is working off
Alan's list and are forward ports of 2.4 patches.
Patches will follow for dpt_i2o, jffs, and es1371.
dpt_i2o patch is probably not maintained and doesn't compile with current bk
-- but that is not because of this fix. Other patches compile.
Thanks,
Kiran
--- linux-2.5.70-bk/drivers/scsi/dpt_i2o.c 2003-06-11 20:56:14.000000000 +0530
+++ bklatest/drivers/scsi/dpt_i2o.c 2003-06-11 21:37:28.000000000 +0530
@@ -2538,7 +2538,7 @@
if(pHba->initialized ) {
if (adpt_i2o_status_get(pHba) < 0) {
- if((rcode = adpt_i2o_reset_hba(pHba) != 0)){
+ if((rcode = adpt_i2o_reset_hba(pHba)) != 0){
printk(KERN_WARNING"%s: Could NOT reset.\n", pHba->name);
return rcode;
}
@@ -2564,7 +2564,7 @@
}
}
} else {
- if((rcode = adpt_i2o_reset_hba(pHba) != 0)){
+ if((rcode = adpt_i2o_reset_hba(pHba)) != 0){
printk(KERN_WARNING"%s: Could NOT reset.\n", pHba->name);
return rcode;
}
--- linux-2.5.70-bk/fs/jffs/intrep.c 2003-06-11 20:49:03.000000000 +0530
+++ bklatest/fs/jffs/intrep.c 2003-06-11 22:21:16.000000000 +0530
@@ -1908,7 +1908,7 @@
}
if ((err = flash_safe_writev(fmc->mtd, node_iovec, iovec_cnt,
- pos) < 0)) {
+ pos)) < 0) {
jffs_fmfree_partly(fmc, fm, 0);
jffs_fm_write_unlock(fmc);
printk(KERN_ERR "JFFS: jffs_write_node: Failed to write, "
--- linux-2.5.70-bk/sound/oss/es1371.c 2003-06-11 20:56:33.000000000 +0530
+++ bklatest/sound/oss/es1371.c 2003-06-11 23:13:06.000000000 +0530
@@ -2853,13 +2853,13 @@
printk(KERN_INFO PFX "found es1371 rev %d at io %#lx irq %u joystick %#x\n",
s->rev, s->io, s->irq, s->gameport.io);
/* register devices */
- if ((res=(s->dev_audio = register_sound_dsp(&es1371_audio_fops,-1))<0))
+ if ((res=(s->dev_audio = register_sound_dsp(&es1371_audio_fops,-1)))<0)
goto err_dev1;
- if ((res=(s->codec.dev_mixer = register_sound_mixer(&es1371_mixer_fops, -1)) < 0))
+ if ((res=(s->codec.dev_mixer = register_sound_mixer(&es1371_mixer_fops, -1))) < 0)
goto err_dev2;
- if ((res=(s->dev_dac = register_sound_dsp(&es1371_dac_fops, -1)) < 0))
+ if ((res=(s->dev_dac = register_sound_dsp(&es1371_dac_fops, -1))) < 0)
goto err_dev3;
- if ((res=(s->dev_midi = register_sound_midi(&es1371_midi_fops, -1))<0 ))
+ if ((res=(s->dev_midi = register_sound_midi(&es1371_midi_fops, -1)))<0 )
goto err_dev4;
#ifdef ES1371_DEBUG
/* initialize the debug proc device */