Your code's syntax makes me want to kill myself; and the overall context of the snippet you posted is difficult to determine. Anyway, I did something similar in some of my collision code for the GM Minish Cap Engine. I think that your code could be fixed up by doing:
//Logic:
//1. If pressing up, then move up.
//2. If you run into something, look for a way to avoid it if possible.
//3. If there is a way off to the left or right side, go there.
//4. If unable to move to the side, just move back down.
var corn_c;
if (up){
y -= 2;
if (place_meeting(x,y,objSolid)){
for (corn_c = 1; corn_c <= 5; corn_c += 1){
if (!place_meeting(x - corn_c,y,objSolid)){
x -= 1;
break;
}
else if (!place_meeting(x + corn_c,y,objSolid)){
x += 1;
break;
}
}
if (place_meeting(x,y,objSolid))
y += 2;
}
}
The code I use in more recent versions of the the GM Minish Cap Engine uses collision_line and instance_position more though than place_meeting. In your code you used place_meeting and then did something with a sprite_width, that is is like way to the right of where the character would be. Typically you don't have to account for the width of the character when using place_meeting, you mostly use it if you are doing something involving point checks; i.e. place_meeting checks the whole collision mask, position_meeting just uses a the x/y coordinates.
The exit statement you used doesn't make much sense either; as the last statement made in the if-block, if its purpose was for leaving the if-block it would be redundant. Otherwise I think that the exit statement is exiting your whole code block prematurely.