Commit 9a4115ba authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

tty: ioc4_serial.c: move assignment out of if () block

We should not be doing assignments within an if () block
so fix up the code to not do this.

change was created using Coccinelle.

CC: Pat Gefre <pfg@sgi.com>
CC: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a8d087d3
...@@ -1011,7 +1011,8 @@ static irqreturn_t ioc4_intr(int irq, void *arg) ...@@ -1011,7 +1011,8 @@ static irqreturn_t ioc4_intr(int irq, void *arg)
*/ */
for (xx = 0; xx < num_intrs; xx++) { for (xx = 0; xx < num_intrs; xx++) {
intr_info = &soft->is_intr_type[intr_type].is_intr_info[xx]; intr_info = &soft->is_intr_type[intr_type].is_intr_info[xx];
if ((this_mir = this_ir & intr_info->sd_bits)) { this_mir = this_ir & intr_info->sd_bits;
if (this_mir) {
/* Disable owned interrupts, call handler */ /* Disable owned interrupts, call handler */
handled++; handled++;
write_ireg(soft, intr_info->sd_bits, IOC4_W_IEC, write_ireg(soft, intr_info->sd_bits, IOC4_W_IEC,
...@@ -2865,10 +2866,12 @@ ioc4_serial_attach_one(struct ioc4_driver_data *idd) ...@@ -2865,10 +2866,12 @@ ioc4_serial_attach_one(struct ioc4_driver_data *idd)
/* register port with the serial core - 1 rs232, 1 rs422 */ /* register port with the serial core - 1 rs232, 1 rs422 */
if ((ret = ioc4_serial_core_attach(idd->idd_pdev, PROTO_RS232))) ret = ioc4_serial_core_attach(idd->idd_pdev, PROTO_RS232);
if (ret)
goto out4; goto out4;
if ((ret = ioc4_serial_core_attach(idd->idd_pdev, PROTO_RS422))) ret = ioc4_serial_core_attach(idd->idd_pdev, PROTO_RS422);
if (ret)
goto out5; goto out5;
Num_of_ioc4_cards++; Num_of_ioc4_cards++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment