public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] sbp-target: checking for NULL instead of IS_ERR
@ 2016-03-02 10:09 Dan Carpenter
  2016-03-05  7:33 ` Nicholas A. Bellinger
  0 siblings, 1 reply; 8+ messages in thread
From: Dan Carpenter @ 2016-03-02 10:09 UTC (permalink / raw)
  To: Chris Boot, Nicholas A. Bellinger
  Cc: target-devel, linux1394-devel, linux-kernel, kernel-janitors

We changed this from kzalloc to sbp_mgt_get_req() so we need to change
from checking for NULL to check for error pointers.

Fixes: c064b2a78989 ('sbp-target: Conversion to percpu_ida tag pre-allocation')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/target/sbp/sbp_target.c b/drivers/target/sbp/sbp_target.c
index 251d532..a04b0605f 100644
--- a/drivers/target/sbp/sbp_target.c
+++ b/drivers/target/sbp/sbp_target.c
@@ -951,7 +951,7 @@ static void tgt_agent_fetch_work(struct work_struct *work)
 
 	while (next_orb && tgt_agent_check_active(agent)) {
 		req = sbp_mgt_get_req(sess, sess->card, next_orb);
-		if (!req) {
+		if (IS_ERR(req)) {
 			spin_lock_bh(&agent->lock);
 			agent->state = AGENT_STATE_DEAD;
 			spin_unlock_bh(&agent->lock);

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-03-11  4:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-02 10:09 [patch] sbp-target: checking for NULL instead of IS_ERR Dan Carpenter
2016-03-05  7:33 ` Nicholas A. Bellinger
2016-03-05  8:45   ` Chris Boot
2016-03-05  9:33     ` Nicholas A. Bellinger
2016-03-10 20:56       ` Chris Boot
2016-03-10 21:52         ` Chris Boot
2016-03-10 22:58           ` Chris Boot
2016-03-11  4:33             ` Nicholas A. Bellinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox