msm: msm_bus: Add NULL pointer checks.

Bus driver is crashing due to a NULL pointer
access sent by the client. A few NULL pointer
checks have been added to protect the driver
from invalid/NULL client handle.

CRs-Fixed: 458264
Change-Id: I822ad312ba1a0c0939d97eb92ea53094d408a836
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
msm: msm_bus: Correct the return value from register-client

On failure, return 0, and not a non-zero value as that can
be interpreted as a valid client ID.

CRs-Fixed: 486328
Change-Id: I7a5b448bc398b4a4792170147a5e5317d25f8b3c
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
msm: msm_bus: Add NULL pointer check

This patch protects the bus driver against clients who try to
update requests without registering the client

Change-Id: Ie740844218dbabe5fca098798c461590aba42e97
CRs-Fixed: 459651
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
msm: msm_bus: Explicitly clear client requests before removal

Clients can potentially leave non-zero requests before
unregistering. Such requests persist and cause instability
and severe power and performance impact.

Protect the system against such clients by explicitly
clearing the client requests before unregistration

Change-Id: I6a905b097de41af168b5f5048b682ba995b581c2
CRs-Fixed: 407057
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
msm: rpm: Initialize the uninitialized variables

sel_mask_ack array will be used to validate the ack received
from rpm. Initialize the sel_mask_ack array to NULL before using it
to make sure that we are comparing the right value read from rpm.

Change-Id: I3dc20bc1594fabf250b98a08461f22482aaa19bf
Signed-off-by: Anji Jonnala <anjir@codeaurora.org>