Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3da82065 authored by Sudip Mukherjee's avatar Sudip Mukherjee Committed by Linus Torvalds
Browse files

drivers/pcmcia/m32r_pcc.c: check return from add_pcc_socket

If request_irq() fails it passes the error to the caller.  The caller
now checks it and jumps to the common error path on failure.

Link: http://lkml.kernel.org/r/1474237304-897-3-git-send-email-sudipm.mukherjee@gmail.com


Signed-off-by: default avatarSudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent c795cf4f
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -696,10 +696,16 @@ static int __init init_m32r_pcc(void)

	pcc_sockets = 0;

	add_pcc_socket(M32R_PCC0_BASE, PCC0_IRQ, M32R_PCC0_MAPBASE, 0x1000);
	ret = add_pcc_socket(M32R_PCC0_BASE, PCC0_IRQ, M32R_PCC0_MAPBASE,
			     0x1000);
	if (ret)
		goto unreg_dev;

#ifdef CONFIG_M32RPCC_SLOT2
	add_pcc_socket(M32R_PCC1_BASE, PCC1_IRQ, M32R_PCC1_MAPBASE, 0x2000);
	ret = add_pcc_socket(M32R_PCC1_BASE, PCC1_IRQ, M32R_PCC1_MAPBASE,
			     0x2000);
	if (ret)
		goto unreg_dev;
#endif

	if (pcc_sockets == 0) {